-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converge local and cloud gorelease scripts, improve release notes
- Loading branch information
Showing
4 changed files
with
88 additions
and
131 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
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
# | ||
# Builds a PR-oriented changelog from the git history for the given module. | ||
# | ||
# Usage (from top of repo): | ||
# | ||
# releasing/build-changelog.sh MODULE TAG CHANGE_LOG_FILE | ||
# | ||
# Where TAG is in the form | ||
# | ||
# api/v1.2.3 | ||
# kustomize/v1.2.3 | ||
# cmd/config/v1.2.3 | ||
# ... etc. | ||
# | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
if [[ -z "${1-}" ]] || [[ -z "${2-}" ]] || [[ -z "${3-}" ]]; then | ||
echo "Usage: $0 <module> <fullTag> <changeLogFile>" | ||
echo "Example: $0 kyaml kyaml/v0.13.4 changelog.txt" | ||
exit 1 | ||
fi | ||
|
||
module=$1 | ||
fullTag=$2 | ||
changeLogFile=$3 | ||
|
||
# Find previous tag that matches the tags module | ||
prevTag=$(git tag -l "$module*" --sort=-version:refname --no-contains="$fullTag" | head -n 1) | ||
|
||
commits=$(git log "$prevTag".."$fullTag" \ | ||
--pretty=format:'%h' \ | ||
--abbrev-commit --no-decorate --no-color --no-merges \ | ||
-- "$module") | ||
|
||
commitList=$(echo "$commits" | paste -s -d'+' -) | ||
|
||
curl -sL "https://api.github.com/search/issues?q=$commitList+repo%3Akubernetes-sigs%2Fkustomize" | jq -r '.items[] | "#\(.number): \(.title) "' > "$changeLogFile" |
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
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