mirror of
https://github.com/simh/simh.git
synced 2026-05-02 14:20:05 +00:00
Win32-Development-Binaries: Update BuildAll
- Avoid building a published version with uncommitted files in the working directory - Confirm existence of remote named origin and fetch master branch - Add automatic force to push remote Win32-Development-Binaries repo when resetting the binary directory
This commit is contained in:
@@ -99,8 +99,12 @@ cd %~p0
|
|||||||
SET GIT_COMMIT_ID=
|
SET GIT_COMMIT_ID=
|
||||||
SET GIT_COMMIT_TIME=
|
SET GIT_COMMIT_TIME=
|
||||||
pushd ..\..
|
pushd ..\..
|
||||||
git checkout -q master
|
git update-index --refresh -- | findstr update > NUL
|
||||||
git fetch -q origin master
|
if not ERRORLEVEL 1 echo **** ERROR **** the local repo has uncommitted files & popd & goto :EOF
|
||||||
|
git remote | findstr origin > NUL
|
||||||
|
if ERRORLEVEL 1 echo **** ERROR **** missing 'origin' remote in this repo & popd & goto :EOF
|
||||||
|
git checkout --quiet master
|
||||||
|
git fetch origin master
|
||||||
git log -1 --pretty="SIM_GIT_COMMIT_ID %%H%%nSIM_GIT_COMMIT_TIME %%aI" >.git-commit-id
|
git log -1 --pretty="SIM_GIT_COMMIT_ID %%H%%nSIM_GIT_COMMIT_TIME %%aI" >.git-commit-id
|
||||||
popd
|
popd
|
||||||
pushd ..
|
pushd ..
|
||||||
@@ -136,11 +140,11 @@ git add README.md
|
|||||||
git commit -m "Initializing the Windows Binary repository"
|
git commit -m "Initializing the Windows Binary repository"
|
||||||
git remote add origin "%REMOTE_REPO%"
|
git remote add origin "%REMOTE_REPO%"
|
||||||
git branch -m master %BIN_REPO%
|
git branch -m master %BIN_REPO%
|
||||||
git push -u origin %BIN_REPO%
|
git push --force -u origin %BIN_REPO%
|
||||||
|
|
||||||
:GitAddNew
|
:GitAddNew
|
||||||
if not exist .git git clone "%REMOTE_REPO%" ./
|
if not exist .git git clone "%REMOTE_REPO%" ./
|
||||||
git pull
|
git pull
|
||||||
set _BINARIES_ALREADY_BUILT=
|
set _BINARIES_ALREADY_BUILT=
|
||||||
for /F "usebackq" %%i in (`git log ^| findstr %GIT_COMMIT_ID%`) do set _BINARIES_ALREADY_BUILT=1
|
for /F "usebackq" %%i in (`git log ^| findstr %GIT_COMMIT_ID%`) do set _BINARIES_ALREADY_BUILT=1
|
||||||
if "%_BINARIES_ALREADY_BUILT%" == "" goto DoBuild
|
if "%_BINARIES_ALREADY_BUILT%" == "" goto DoBuild
|
||||||
|
|||||||
Reference in New Issue
Block a user