forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
output current_branch name instead of HEAD in help messages
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,10 +45,10 @@ if ! git diff-files --quiet pkg/version/base.go; then | |
fi | ||
|
||
release_branch="release-${VERSION_MAJOR}.${VERSION_MINOR}" | ||
current_branch=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if [[ "${VERSION_PATCH}" != "0" ]]; then | ||
branch=$(git rev-parse --abbrev-ref HEAD) | ||
if [[ ${branch} != "${release_branch}" ]]; then | ||
if [[ ${current_branch} != "${release_branch}" ]]; then | ||
echo "!!! You are trying to tag to an existing minor release but are not on the release branch: ${release_branch}" | ||
exit 1 | ||
fi | ||
|
@@ -98,11 +98,11 @@ echo "" | |
echo "- Push the tag:" | ||
echo " git push [email protected]:GoogleCloudPlatform/kubernetes.git v${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" | ||
if [[ "${VERSION_PATCH}" == "0" ]]; then | ||
echo "- Submit HEAD as a PR to master" | ||
echo "- Submit branch: ${current_branch} as a PR to master" | ||
echo "- Merge that PR" | ||
echo "- Push the new release branch" | ||
echo " git push [email protected]:GoogleCloudPlatform/kubernetes.git ${release_branch}" | ||
else | ||
echo "- Submit HEAD as a PR to ${release_branch}" | ||
echo "- Submit branch: ${current_branch} as a PR to ${release_branch}" | ||
echo "- Merge that PR" | ||
fi |