From 942529cfadd42e9406638d3a3b95f434a07d22a3 Mon Sep 17 00:00:00 2001 From: Sergio Rua Date: Thu, 26 Sep 2024 11:57:33 +0100 Subject: [PATCH] Debug --- .github/workflows/debug-brew.yml | 5 +++-- .github/workflows/release.yml | 21 ++++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/debug-brew.yml b/.github/workflows/debug-brew.yml index fec40016..00341a2c 100644 --- a/.github/workflows/debug-brew.yml +++ b/.github/workflows/debug-brew.yml @@ -21,8 +21,9 @@ jobs: - name: Make changes to Homebrew run: | set -x - VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') - #echo "VERSION=$VERSION" >> $GITHUB_ENV + if [[ "$VERSION" == "" ]]; then + VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') + fi case $VERSION in *internal*) NAME=axonopsworkbench-internal diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f241498d..858d31cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -275,8 +275,10 @@ jobs: - name: Make changes to Homebrew run: | - VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') - #echo "VERSION=$VERSION" >> $GITHUB_ENV + set -x + if [[ "$VERSION" == "" ]]; then + VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') + fi case $VERSION in *internal*) NAME=axonopsworkbench-internal @@ -341,7 +343,9 @@ jobs: - name: Make changes to chocolatey run: | - VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') + if [[ "$VERSION" == "" ]]; then + VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') + fi #echo "VERSION=$VERSION" >> $GITHUB_ENV cd chocolatey git config user.name "GitHub Actions" @@ -391,6 +395,9 @@ jobs: - name: "Set runtime variables" run: | + if [[ "$VERSION" == "" ]]; then + VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') + fi PUBLISH="yes" DEBIAN_ARCHS="amd64" REDHAT_ARCHS="x86_64" @@ -414,7 +421,9 @@ jobs: - name: Push Debian package if: env.PUBLISH == 'yes' run: | - VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') + if [[ "$VERSION" == "" ]]; then + VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') + fi for arch in ${{ env.DEBIAN_ARCHS }}; do curl -sLO "https://github.com/axonops/axonops-workbench-cassandra/releases/download/$VERSION/AxonOps.Workbench-$VERSION-linux-${arch}.deb" gcloud config set project axonops-public @@ -424,7 +433,9 @@ jobs: - name: Push RedHat package if: env.PUBLISH == 'yes' run: | - VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') + if [[ "$VERSION" == "" ]]; then + VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//g') + fi for arch in ${{ env.REDHAT_ARCHS }}; do curl -sLO "https://github.com/axonops/axonops-workbench-cassandra/releases/download/$VERSION/AxonOps.Workbench-$VERSION-linux-${arch}.rpm" gcloud config set project axonops-public