diff --git a/.github/workflows/linux-trusty-5.12.yml b/.github/workflows/linux-trusty-5.12.yml index 43a5bb79d..281c135af 100644 --- a/.github/workflows/linux-trusty-5.12.yml +++ b/.github/workflows/linux-trusty-5.12.yml @@ -21,8 +21,12 @@ jobs: id: version_number if: github.event_name == 'push' run: | - bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release" + bash -x ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release" + echo "in yml we have PWD $(pwd)" + ls -l release-version + cat release-version version=$(> $GITHUB_OUTPUT - name: store dummy version and build number for pull request diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f5a7f9cfd..d5b7046d5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -22,10 +22,13 @@ jobs: if: github.event_name == 'push' run: | bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release" + echo "in yml we have PWD $(pwd)" + ls -l release-version + cat release-version version=$(> $GITHUB_OUTPUT - - name: store dummy version and build number for pull request if: github.event_name == 'pull_request' run: | diff --git a/scripts/get-atomic-buildnr.sh b/scripts/get-atomic-buildnr.sh index bce45fb21..bdb93742e 100644 --- a/scripts/get-atomic-buildnr.sh +++ b/scripts/get-atomic-buildnr.sh @@ -11,16 +11,21 @@ # checkout the nightly-builds repo in parallel to the main repo # the clone followed by the pointless push should verify that the password is stored in the config # that way the script doesn't need the password -cd .. +SCRIPT_SOURCE=$(dirname "${BASH_SOURCE[0]}") +PARENT_DIR=$(cd "$SCRIPT_SOURCE"/../.. && pwd) url="https://subsurface:$2@github.com/subsurface/nightly-builds" +cd "$PARENT_DIR" git clone -b main https://github.com/subsurface/nightly-builds cd nightly-builds git remote set-url origin "$url" git push origin main echo "build number prior to get-or-create was $( subsurface/latest-subsurface-buildnumber-extension bash subsurface/scripts/get-version > subsurface/release-version +echo "$PARENT_DIR" +ls -l "$PARENT_DIR"/subsurface/release-version +cat "$PARENT_DIR"/subsurface/release-version