gitlab-ci, build: compute the checksums of installer in bash script.

I completely forgot that since the installer is built on a Windows
runner, I cannot expect a standard Linux shell syntax.
As a consequence, commit de9a171a19 broke the "win-installer-nightly"
job with the following error:

> The token '&&' is not a valid statement separator in this version.

Rather than trying to find the equivalent command to run on powershell
or whatever, let's just compute the checksum at the end of our installer
creation script.
This commit is contained in:
Jehan 2021-08-01 14:43:51 +02:00
parent 0a4915cb9d
commit 34748af7a7
2 changed files with 4 additions and 4 deletions

View file

@ -690,10 +690,6 @@ win-installer-nightly:
script: script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/installer-gimp-msys2.sh > installer.log 2>&1" - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/installer-gimp-msys2.sh > installer.log 2>&1"
- cd build/windows/installer/_Output
- FILENAME=`ls gimp-*.exe` &&
sha256sum gimp-*.exe > ${FILENAME}.SHA256SUMS &&
sha512sum gimp-*.exe > ${FILENAME}.SHA512SUMS
needs: ["packaging-win32-native", "packaging-win64-native"] needs: ["packaging-win32-native", "packaging-win64-native"]
sources: sources:

View file

@ -39,6 +39,10 @@ cd build/windows/installer
# Test if the installer was created and return success/failure. # Test if the installer was created and return success/failure.
if [ -f "_Output/gimp-${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}-setup.exe" ]; then if [ -f "_Output/gimp-${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}-setup.exe" ]; then
cd _Output/
INSTALLER="gimp-${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}-setup.exe"
sha256sum $INSTALLER > ${INSTALLER}.SHA256SUMS
sha512sum $INSTALLER > ${INSTALLER}.SHA512SUMS
exit 0 exit 0
else else
exit 1 exit 1