Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: bootstrap/win/win_tools.bat

Issue 2249163005: Make git version numbers external to batch script. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bootstrap/win/git_version_bleeding_edge.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 @echo off 1 @echo off
2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 :: Use of this source code is governed by a BSD-style license that can be 3 :: Use of this source code is governed by a BSD-style license that can be
4 :: found in the LICENSE file. 4 :: found in the LICENSE file.
5 5
6 :: This script will determine if python, git, or svn binaries need updates. It 6 :: This script will determine if python, git, or svn binaries need updates. It
7 :: returns 123 if the user's shell must restart, otherwise !0 is failure 7 :: returns 123 if the user's shell must restart, otherwise !0 is failure
8 8
9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly 9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly
10 :: returned. 10 :: returned.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 :: must explicitly use FIND_EXE to prevent this from grabbing e.g. gnuwin32 or 62 :: must explicitly use FIND_EXE to prevent this from grabbing e.g. gnuwin32 or
63 :: msys versions. 63 :: msys versions.
64 set FIND_EXE=%SYSTEMROOT%\System32\find.exe 64 set FIND_EXE=%SYSTEMROOT%\System32\find.exe
65 65
66 :: Check to see if we're on a 32 or 64 bit system 66 :: Check to see if we're on a 32 or 64 bit system
67 :: (parens) are necessary, otherwise batch puts an extra space after 32. 67 :: (parens) are necessary, otherwise batch puts an extra space after 32.
68 reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | %FIND_EXE% /i "x86" > NUL && (set OS_BITS=32) || (set OS_BITS=64) 68 reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | %FIND_EXE% /i "x86" > NUL && (set OS_BITS=32) || (set OS_BITS=64)
69 69
70 if not exist "%WIN_TOOLS_ROOT_DIR%\.git_bleeding_edge" ( 70 if not exist "%WIN_TOOLS_ROOT_DIR%\.git_bleeding_edge" (
71 set GIT_VERSION=2.8.3 71 set /p GIT_VERSION= <"%~dp0git_version.txt"
72 ) else ( 72 ) else (
73 set GIT_VERSION=2.8.3 73 set /p GIT_VERSION= <"%~dp0git_version_bleeding_edge.txt"
74 ) 74 )
75 set GIT_VERSION=%GIT_VERSION%-%OS_BITS% 75 set GIT_VERSION=%GIT_VERSION%-%OS_BITS%
76 76
77 set GIT_FETCH_URL=%CHROME_INFRA_URL%PortableGit-%GIT_VERSION%-bit.7z.exe 77 set GIT_FETCH_URL=%CHROME_INFRA_URL%PortableGit-%GIT_VERSION%-bit.7z.exe
78 set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.7z.exe 78 set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.7z.exe
79 set GIT_BIN_DIR=git-%GIT_VERSION%_bin 79 set GIT_BIN_DIR=git-%GIT_VERSION%_bin
80 set GIT_INST_DIR=%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR% 80 set GIT_INST_DIR=%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%
81 set GIT_EXE_PATH=%GIT_INST_DIR%\bin\git.exe 81 set GIT_EXE_PATH=%GIT_INST_DIR%\bin\git.exe
82 82
83 :: Clean up any release which doesn't match the one we want. 83 :: Clean up any release which doesn't match the one we want.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 set ERRORLEVEL=1 216 set ERRORLEVEL=1
217 goto :END 217 goto :END
218 218
219 219
220 :returncode 220 :returncode
221 set WIN_TOOLS_ROOT_DIR= 221 set WIN_TOOLS_ROOT_DIR=
222 exit /b %ERRORLEVEL% 222 exit /b %ERRORLEVEL%
223 223
224 :END 224 :END
225 call :returncode %ERRORLEVEL% 225 call :returncode %ERRORLEVEL%
OLDNEW
« no previous file with comments | « bootstrap/win/git_version_bleeding_edge.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698