Skip to content

Commit

Permalink
Add github run number to version
Browse files Browse the repository at this point in the history
  • Loading branch information
JockeJarre committed Jul 2, 2024
1 parent 8a81eb5 commit 7ee1970
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/b2s-backglass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@ jobs:
name: Update AssemblyInformationalVersion
run: |
SHA7="${GITHUB_SHA::7}"
: # B2SServerPluginInterface
ASSEMBLY_INFO="B2SServerPluginInterface/B2SServerPluginInterface/Properties/AssemblyInfo.cs"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
echo -e "\n[assembly: AssemblyInformationalVersion(\"${TAG}\")]" >> "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2s_screenresidentifier/b2s_screenresidentifier/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
: # b2sbackglassserver
ASSEMBLY_INFO="b2sbackglassserver/b2sbackglassserver/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1).${{ github.run_number }}
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2sbackglassserverregisterapp/b2sbackglassserverregisterapp/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
: # b2s_screenresidentifier
ASSEMBLY_INFO="b2s_screenresidentifier/b2s_screenresidentifier/My Project/AssemblyInfo.vb"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2sbackglassserver/b2sbackglassserver/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
: # b2sbackglassserverregisterapp
ASSEMBLY_INFO="b2sbackglassserverregisterapp/b2sbackglassserverregisterapp/My Project/AssemblyInfo.vb"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
: # B2SWindowPunch
ASSEMBLY_INFO="B2SWindowPunch/B2SWindowPunch/Properties/AssemblyInfo.cs"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
: # Keep the TAG for later
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: microsoft/setup-msbuild@v2
- name: Build B2SServerPluginInterface
run: |
Expand Down

0 comments on commit 7ee1970

Please sign in to comment.