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

Release script improvements #1157

Merged
merged 2 commits into from
May 31, 2024
Merged
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
11 changes: 9 additions & 2 deletions scripts/roll_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

set -o errexit

REPO="eth-cscs/DLA-Future"
VERSION_MAJOR=$(sed -n 's/project(DLAF VERSION \([0-9]\+\)\.[0-9]\+\.[0-9]\+)/\1/p' CMakeLists.txt)
VERSION_MINOR=$(sed -n 's/project(DLAF VERSION [0-9]\+\.\([0-9]\+\)\.[0-9]\+)/\1/p' CMakeLists.txt)
VERSION_PATCH=$(sed -n 's/project(DLAF VERSION [0-9]\+\.[0-9]\+\.\([0-9]\+\))/\1/p' CMakeLists.txt)
Expand All @@ -29,6 +30,11 @@ if ! which gh >/dev/null 2>&1; then
exit 1
fi

if ! gh auth status >/dev/null 2>&1; then
echo 'gh is not logged in. Run `gh auth login` to authenticate with your GitHub account, or set `GITHUB_TOKEN` to a token with `public_repo` access. Exiting.'
exit 1
fi

# Major and minor releases are made directly from master. Patch releases are branched out from the major
# and minor releases with a version_X.Y branch.
if [[ "${VERSION_PATCH}" -eq 0 ]]; then
Expand Down Expand Up @@ -153,5 +159,6 @@ fi
echo ""
echo "Creating release."
gh release create "${VERSION_FULL_TAG}" \
--title "${VERSION_TITLE}" \
--notes "${VERSION_DESCRIPTION}"
--repo "${REPO}" \
--title "${VERSION_TITLE}" \
--notes "${VERSION_DESCRIPTION}"
Loading