From 40a81308dbc1144e7076d511ecebca90db8ae030 Mon Sep 17 00:00:00 2001 From: axmmisaka <6500159+axmmisaka@users.noreply.github.com> Date: Thu, 19 Oct 2023 17:57:49 -0700 Subject: [PATCH 1/2] CI updated to include commit SHA in version number when creating nightly build --- .github/workflows/nightly-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 44232bd948..ca721dd280 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -17,6 +17,10 @@ jobs: fetch-depth: 0 - name: Prepare build environment uses: ./.github/actions/prepare-build-env + - name: Modify property file to contain the commit SHA + shell: bash + run: > + sed --regexp-extended --in-place "s/^(VERSION = .*)$/\1@$(git rev-parse --short HEAD)/" core/src/main/resources/org/lflang/StringsBundle.properties - name: Build and package lf cli tools (nightly build) shell: bash run: | From e4fbb08cf0a49b99091e3a2ef9828ba379172600 Mon Sep 17 00:00:00 2001 From: Kagamihara Nadeshiko Date: Mon, 23 Oct 2023 14:59:04 -0700 Subject: [PATCH 2/2] Cleanup CI workflow, apply @erlingj suggestions --- .github/workflows/nightly-build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index ca721dd280..199f15ba23 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -19,8 +19,10 @@ jobs: uses: ./.github/actions/prepare-build-env - name: Modify property file to contain the commit SHA shell: bash - run: > - sed --regexp-extended --in-place "s/^(VERSION = .*)$/\1@$(git rev-parse --short HEAD)/" core/src/main/resources/org/lflang/StringsBundle.properties + run: | + TIMESTAMP="$(date +'%Y-%m-%d')" + SHA="$(git rev-parse --short HEAD)" + sed --regexp-extended --in-place "s/^(VERSION = .*)$/\1 ${SHA} ${TIMESTAMP}/" core/src/main/resources/org/lflang/StringsBundle.properties - name: Build and package lf cli tools (nightly build) shell: bash run: |