From 45689d75b89047127b82a75ad9f362423d62eff8 Mon Sep 17 00:00:00 2001 From: Jarr3 Date: Tue, 2 Jul 2024 08:07:18 +0200 Subject: [PATCH] Add github run number to version --- .github/workflows/b2s-backglass.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/b2s-backglass.yml b/.github/workflows/b2s-backglass.yml index ffcf6df..59cdf4d 100644 --- a/.github/workflows/b2s-backglass.yml +++ b/.github/workflows/b2s-backglass.yml @@ -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: |