mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-06 20:09:54 -05:00
Skip building Windows nightlies if there are no new commits
Windows build script will now save, and check, the last build commit and skip building if there are no new commits since the last automatic build. See #1917.
This commit is contained in:
@@ -47,6 +47,19 @@ git pull
|
||||
git clean -dffx
|
||||
|
||||
|
||||
:: Get the current commit hash
|
||||
FOR /F %%A IN ('git rev-parse --verify HEAD') DO SET CURRENT_COMMIT=%%A
|
||||
|
||||
:: Get the last build commit hash from the server
|
||||
curl -f -L -o commit.txt "https://nightlies.sqlitebrowser.org/win32/commit.txt"
|
||||
|
||||
:: Save the hash to a variable for comparison
|
||||
IF EXIST "commit.txt" SET /P LAST_COMMIT=<commit.txt
|
||||
|
||||
:: Do not continue if there are no changes
|
||||
IF "%CURRENT_COMMIT%"=="%LAST_COMMIT%" EXIT
|
||||
|
||||
|
||||
:: WIN32 SQLITE BUILD PROCEDURE
|
||||
|
||||
:: Set path variables
|
||||
@@ -112,6 +125,10 @@ MOVE %CD%\zip\System\* "%CD%\zip\DB Browser for SQLite"
|
||||
RMDIR /S /Q %CD%\zip
|
||||
|
||||
|
||||
:: Save the last commit hash to 'commit.txt' and upload it to the nightlies server
|
||||
git rev-parse --verify HEAD 1>commit.txt
|
||||
pscp -q -p -i C:\dev\puttygen_private.ppk "%DEST_PATH%\commit.txt" nightlies@nightlies.sqlitebrowser.org:/nightlies/win32
|
||||
|
||||
:: Upload the packages to the nightlies server
|
||||
pscp -q -p -i C:\dev\puttygen_private.ppk "%DEST_PATH%\DB*%RUN_DATE%*win32.*" nightlies@nightlies.sqlitebrowser.org:/nightlies/win32
|
||||
|
||||
|
||||
@@ -47,6 +47,19 @@ git pull
|
||||
git clean -dffx
|
||||
|
||||
|
||||
:: Get the current commit hash
|
||||
FOR /F %%A IN ('git rev-parse --verify HEAD') DO SET CURRENT_COMMIT=%%A
|
||||
|
||||
:: Get the last build commit hash from the server
|
||||
curl -f -L -o commit.txt "https://nightlies.sqlitebrowser.org/win64/commit.txt"
|
||||
|
||||
:: Save the hash to a variable for comparison
|
||||
IF EXIST "commit.txt" SET /P LAST_COMMIT=<commit.txt
|
||||
|
||||
:: Do not continue if there are no changes
|
||||
IF "%CURRENT_COMMIT%"=="%LAST_COMMIT%" EXIT
|
||||
|
||||
|
||||
:: WIN64 SQLITE BUILD PROCEDURE
|
||||
|
||||
:: Set path variables
|
||||
@@ -112,6 +125,10 @@ MOVE %CD%\zip\System64\* "%CD%\zip\DB Browser for SQLite"
|
||||
RMDIR /S /Q %CD%\zip
|
||||
|
||||
|
||||
:: Save the last commit hash to 'commit.txt' and upload it to the nightlies server
|
||||
git rev-parse --verify HEAD 1>commit.txt
|
||||
pscp -q -p -i C:\dev\puttygen_private.ppk "%DEST_PATH%\commit.txt" nightlies@nightlies.sqlitebrowser.org:/nightlies/win64
|
||||
|
||||
:: Upload the packages to the nightlies server
|
||||
pscp -q -p -i C:\dev\puttygen_private.ppk "%DEST_PATH%\DB*%RUN_DATE%*win64.*" nightlies@nightlies.sqlitebrowser.org:/nightlies/win64
|
||||
|
||||
|
||||
Reference in New Issue
Block a user