diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index 5525552106..43f8d4f769 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -20,8 +20,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars @@ -57,8 +55,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars @@ -80,8 +76,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars @@ -103,8 +97,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars @@ -126,8 +118,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars @@ -153,8 +143,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars diff --git a/.github/workflows/build-staging.yaml b/.github/workflows/build-staging.yaml index 4567d2249c..fe56c3d076 100644 --- a/.github/workflows/build-staging.yaml +++ b/.github/workflows/build-staging.yaml @@ -15,8 +15,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars @@ -37,8 +35,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars @@ -59,8 +55,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars @@ -81,8 +75,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars @@ -103,8 +95,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars @@ -133,8 +123,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: master - name: Populate environment run: ./make.sh ci-export-vars diff --git a/contrib/genbuild.sh b/contrib/genbuild.sh index 64bccc5867..47b12a2600 100755 --- a/contrib/genbuild.sh +++ b/contrib/genbuild.sh @@ -25,7 +25,7 @@ git_check_in_repo() { DESC="" SUFFIX="" CURRENT_BRANCH="" -if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" ] && [ -e "$(command -v git)" ] && [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] && git_check_in_repo contrib/genbuild.sh; then +if [ -z "$BUILD_VERSION" ] && [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" ] && [ -e "$(command -v git)" ] && [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] && git_check_in_repo contrib/genbuild.sh; then # clean 'dirty' status of touched files that haven't been modified git diff >/dev/null 2>/dev/null @@ -49,14 +49,15 @@ if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" ] && [ -e "$(command -v git)" ] && [ "$ SUFFIX="$(echo $CURRENT_BRANCH | sed 's/\//-/g')-$SUFFIX" fi - if [ "$CURRENT_BRANCH" != "hotfix" ] && [ "$CURRENT_BRANCH" != "master" ]; then - # if it's hotfix branch, don't mark dirty. - # otherwise generate suffix from git, i.e. string like "59887e8-dirty". - git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty" - fi + # Check for changes in tracked files against the + # index/working tree, mark as dirty if changes + # are present. + git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty" fi -if [ -n "$DESC" ]; then +if [ -n "$BUILD_VERSION" ]; then + NEWINFO="#define BUILD_DESC \"$BUILD_VERSION\"" +elif [ -n "$DESC" ]; then NEWINFO="#define BUILD_DESC \"$DESC\"" elif [ -n "$SUFFIX" ]; then NEWINFO="#define BUILD_SUFFIX $SUFFIX"