mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
chore: support manual changelog and version 2.0 for releases (#8880)
* chore(release): add manual changelog + 2.0 support * add comment * fix typo * fmt
This commit is contained in:
@ -18,11 +18,16 @@ source "$(dirname "$(dirname "${BASH_SOURCE[0]}")")/lib.sh"
|
||||
old_version=
|
||||
new_version=
|
||||
ref=
|
||||
check_for_changelog=0
|
||||
|
||||
args="$(getopt -o '' -l old-version:,new-version:,ref: -- "$@")"
|
||||
args="$(getopt -o '' -l check-for-changelog,old-version:,new-version:,ref: -- "$@")"
|
||||
eval set -- "$args"
|
||||
while true; do
|
||||
case "$1" in
|
||||
--check-for-changelog)
|
||||
check_for_changelog=1
|
||||
shift
|
||||
;;
|
||||
--old-version)
|
||||
old_version="$2"
|
||||
shift 2
|
||||
@ -61,6 +66,15 @@ if [[ -z $ref ]]; then
|
||||
error "No ref specified"
|
||||
fi
|
||||
|
||||
# Use a manual changelog, if present
|
||||
changelog_path="$(git rev-parse --show-toplevel)/docs/changelogs/$new_version.md"
|
||||
if [ "$check_for_changelog" -eq 1 ]; then
|
||||
if [ -f "$changelog_path" ]; then
|
||||
cat "$changelog_path"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# shellcheck source=scripts/release/check_commit_metadata.sh
|
||||
source "$SCRIPT_DIR/check_commit_metadata.sh" "$old_version" "$ref"
|
||||
|
||||
|
Reference in New Issue
Block a user