Add script for updating VersionInfo, teach GitLab CI to build releases

This commit is contained in:
YoshiRulz 2020-10-08 07:23:10 +10:00
parent ab28dbc501
commit 0084891635
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 7 additions and 1 deletions

View File

@ -13,6 +13,7 @@ build:
- output
- test_output
script:
- if [ "$CI_COMMIT_REF_SLUG" == "release" ]; then Dist/UpdateVersionInfoForRelease.sh; fi
- Dist/BuildRelease.sh
stage: build
@ -34,7 +35,7 @@ package:
- ./*
image: ubuntu:focal
rules:
- if: '$CI_COMMIT_REF_SLUG == "master"'
- if: '$CI_COMMIT_REF_SLUG == "master" || $CI_COMMIT_REF_SLUG == "release"'
when: always
script:
- su -c "apt-get update && apt-get -y install p7zip-full"

View File

@ -0,0 +1,5 @@
#!/bin/sh
echo "yo we updating VersionInfo"
cd "$(dirname "$0")/../src/BizHawk.Common"
sed -i "s/ReleaseDate = \"[^\"]*\"/ReleaseDate = \"$(date "+%B %-d, %Y")\"/" "VersionInfo.cs"
sed -i "s/DeveloperBuild = true/DeveloperBuild = false/" "VersionInfo.cs"