From bfaaeda40527ed678e04e12536f8cc25549cc0db Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 10 Jan 2024 07:11:27 -0800 Subject: [PATCH] build-system: small changes for better debugging In order to make it easier to see what's happening inside get-atomic-buildnr.sh write the result to a file that can be read by the caller. Not quite as elegant, but hopefully more practical to see what's going wrong when no new build number is created. Make sure that post-releasenotes is successfull by actually posting a release artifact (apparently the gh release action otherwise quietly fails). Try to ensure we find the Android APK when uploading to the release. Signed-off-by: Dirk Hohndel --- .github/workflows/android.yml | 7 +++---- .github/workflows/fedora-copr-build.yml | 3 ++- .github/workflows/linux-snap.yml | 3 +-- .github/workflows/linux-trusty-5.12.yml | 7 +++---- .github/workflows/mac.yml | 5 ++--- .github/workflows/post-releasenotes.yml | 9 +++++---- .github/workflows/ubuntu-launchpad-build.yml | 3 +-- .github/workflows/windows.yml | 5 ++--- scripts/get-atomic-buildnr.sh | 9 +++++++-- 9 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index a42af2f18..f16a78ceb 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -25,8 +25,7 @@ jobs: id: version_number if: github.event_name == 'push' run: | - version="$(bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")" - echo "version=$version" >> $GITHUB_OUTPUT + bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release" - name: store dummy version and build number for non-push build runs if: github.event_name != 'push' @@ -70,13 +69,13 @@ jobs: if: github.event_name == 'push' uses: softprops/action-gh-release@v1 with: - tag_name: v${{ steps.version_number.outputs.version }} + tag_name: v$(> $GITHUB_OUTPUT - name: Setup API token for copr-cli diff --git a/.github/workflows/linux-snap.yml b/.github/workflows/linux-snap.yml index 62bf3509b..a174c87bd 100644 --- a/.github/workflows/linux-snap.yml +++ b/.github/workflows/linux-snap.yml @@ -24,8 +24,7 @@ jobs: id: version_number if: github.event_name == 'push' run: | - version=$(bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release") - echo "version=$version" >> $GITHUB_OUTPUT + bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release" - name: store dummy version and build number for pull request if: github.event_name == 'pull_request' diff --git a/.github/workflows/linux-trusty-5.12.yml b/.github/workflows/linux-trusty-5.12.yml index 1ed7658f5..daa43acde 100644 --- a/.github/workflows/linux-trusty-5.12.yml +++ b/.github/workflows/linux-trusty-5.12.yml @@ -21,8 +21,7 @@ jobs: id: version_number if: github.event_name == 'push' run: | - version=$(bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release") - echo "version=$version" >> $GITHUB_OUTPUT + bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release" - name: store dummy version and build number for pull request if: github.event_name == 'pull_request' @@ -56,14 +55,14 @@ jobs: - name: prepare release artifacts if: github.event_name == 'push' run: | - mv Subsurface.AppImage Subsurface-v${{ steps.version_number.outputs.version }}.AppImage + mv Subsurface.AppImage Subsurface-v(> $GITHUB_OUTPUT + bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release" - name: store dummy version and build number for pull request if: github.event_name == 'pull_request' @@ -59,7 +58,7 @@ jobs: if: github.event_name == 'push' uses: softprops/action-gh-release@v1 with: - tag_name: v${{ steps.version_number.outputs.version }} + tag_name: v$(> $GITHUB_OUTPUT + bash -x ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release" bash scripts/create-releasenotes.sh ${{ github.event.head_commit.id }} + # ironically, we have to upload a file, otherwise this won't create a release with just the release notes - name: publish release uses: softprops/action-gh-release@v1 with: - tag_name: v${{ steps.version_number.outputs.version }} + tag_name: v$(> $GITHUB_OUTPUT + bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release" - name: Setup build dependencies run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index aee406884..ddc8650a6 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -21,8 +21,7 @@ jobs: id: version_number if: github.event_name == 'push' run: | - version=$(bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release") - echo "version=$version" >> $GITHUB_OUTPUT + bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release" - name: store dummy version and build number for pull request if: github.event_name == 'pull_request' @@ -52,7 +51,7 @@ jobs: if: github.event_name == 'push' uses: softprops/action-gh-release@v1 with: - tag_name: v${{ steps.version_number.outputs.version }} + tag_name: v$( /dev/null +echo "build number after get-or-create is $( subsurface/latest-subsurface-buildnumber-extension -bash subsurface/scripts/get-version +bash subsurface/scripts/get-version > subsurface/release-version