Skip to content

Commit

Permalink
tag-release.sh: Prefer github-cli to hub, if available
Browse files Browse the repository at this point in the history
  • Loading branch information
ahesford committed Nov 18, 2020
1 parent 940cd4c commit b21c3f1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions releng/tag-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,11 @@ if echo "${release}" | grep -q "[A-Za-z]"; then
prerelease="--prerelease"
fi

# Hub creates the tag for us
hub release create ${prerelease} -F "${relnotes}" "${tag}"
# Use github-cli or hub to push the release
if command -v gh >/dev/null 2>&1; then
gh release create "${tag}" ${prerelease} -F "${relnotes}"
elif command -v hub >/dev/null 2>&1; then
hub release create ${prerelease} -F "${relnotes}" "${tag}"
else
error "ERROR: Please install github-cli or hub"
fi

0 comments on commit b21c3f1

Please sign in to comment.