Skip to content

Commit

Permalink
add commit log to release tag script (#584)
Browse files Browse the repository at this point in the history
this is intended to provide more context to the releaser when they are
running the script
  • Loading branch information
sdowell authored May 9, 2023
1 parent e455804 commit 34b8af9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion Makefile.release
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
__tag-release-candidate:
@echo "+++ Tagging release candidate"
@./scripts/fail-if-dirty-repo.sh # Fail if the repo is dirty
@echo "+++ Tagging commit $(shell git rev-parse HEAD) with CS_VERSION=$(CS_VERSION)"
CS_VERSION="$(CS_VERSION)" ./scripts/tag-release-candidate.sh

.PHONY: __promote-rc-tag
Expand Down
9 changes: 9 additions & 0 deletions scripts/tag-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ echo "+++ Most recent RC of version $CS_VERSION: $RC"
NEXT_RC=$(increment_rc_of_semver "$RC")
echo "+++ Incremented RC. NEXT_RC: $NEXT_RC"

# Log main/release branch for more context
if [[ "${branch}" == "main" ]]; then
git log --oneline --graph -30 "${remote_sha}"
else
git fetch "${REMOTE}" main > /dev/null
main_sha=$(git rev-parse FETCH_HEAD)
git log --oneline --graph -30 "${main_sha}" "${remote_sha}"
fi

read -rp "This will tag commit ${remote_sha} from branch ${branch} as ${NEXT_RC} - Proceed (yes/no)? " choice
case "${choice}" in
yes) ;;
Expand Down

0 comments on commit 34b8af9

Please sign in to comment.