From f99594d9e91f3b6843195b783f23a0a6a566e289 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 26 Feb 2024 09:18:36 -0500 Subject: [PATCH 1/5] Show auto version -v (to be able to debug) and then take last line for the actual version boost --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2fcc8532..a6b68469 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,9 @@ jobs: - name: Check whether a release is due id: auto-version run: | - version="$(~/auto version)" + # to be able to debug if something goes wrong + auto version -v | tee /tmp/auto-version + version="$(tail -n 1 /tmp/auto-version)" echo "version=$version" >> "$GITHUB_OUTPUT" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c41a49b5049fca5a3bec0d241434dc3db116731e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 26 Feb 2024 09:20:11 -0500 Subject: [PATCH 2/5] Fix the incorrect label on invocation of auto version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6b68469..15d9c233 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: wget -O- https://github.com/intuit/auto/releases/download/v10.16.1/auto-linux.gz | gunzip > ~/auto chmod a+x ~/auto - - name: Check whether a release is due + - name: Query 'auto' on type of the release id: auto-version run: | # to be able to debug if something goes wrong From e9fe9605c24e17be4573e36eb13cd67df3699167 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 26 Feb 2024 10:38:16 -0500 Subject: [PATCH 3/5] set -o pipefail + do not rely on bump being the last line -- parse from debug msg --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15d9c233..66a2e29b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,8 +28,9 @@ jobs: id: auto-version run: | # to be able to debug if something goes wrong + set -o pipefail auto version -v | tee /tmp/auto-version - version="$(tail -n 1 /tmp/auto-version)" + version=$(sed -ne '/Calculated SEMVER bump:/s,.*: *,,p' < /tmp/auto-version) echo "version=$version" >> "$GITHUB_OUTPUT" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d26e901e8b491b4c472dcbc09b560f6071af8588 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 26 Feb 2024 12:54:25 -0500 Subject: [PATCH 4/5] Be more verbose while invoking auto version Co-authored-by: John T. Wodder II --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66a2e29b..97a59f3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: run: | # to be able to debug if something goes wrong set -o pipefail - auto version -v | tee /tmp/auto-version + auto version -vv | tee /tmp/auto-version version=$(sed -ne '/Calculated SEMVER bump:/s,.*: *,,p' < /tmp/auto-version) echo "version=$version" >> "$GITHUB_OUTPUT" env: From 17aad35a5d2cfe487fd24e5685e82a2d56525c26 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 26 Feb 2024 12:54:51 -0500 Subject: [PATCH 5/5] Do not bother with < + quote just in case Co-authored-by: John T. Wodder II --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97a59f3f..cb3af600 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: # to be able to debug if something goes wrong set -o pipefail auto version -vv | tee /tmp/auto-version - version=$(sed -ne '/Calculated SEMVER bump:/s,.*: *,,p' < /tmp/auto-version) + version="$(sed -ne '/Calculated SEMVER bump:/s,.*: *,,p' /tmp/auto-version)" echo "version=$version" >> "$GITHUB_OUTPUT" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}