Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Fix creating / staging release #2708

Merged
merged 8 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand Down Expand Up @@ -57,8 +55,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand All @@ -80,8 +76,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand All @@ -103,8 +97,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand All @@ -126,8 +118,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand All @@ -153,8 +143,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/build-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand All @@ -37,8 +35,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand All @@ -59,8 +55,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand All @@ -81,8 +75,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand All @@ -103,8 +95,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand Down Expand Up @@ -133,8 +123,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master

- name: Populate environment
run: ./make.sh ci-export-vars
Expand Down
15 changes: 8 additions & 7 deletions contrib/genbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
Expand Down
Loading