mirror of
https://github.com/orhun/systeroid
synced 2024-09-06 00:09:01 +00:00
feat(release): allow empty changelog while releasing
This commit is contained in:
parent
a3d51f0ce5
commit
0dcfeba90d
|
@ -14,11 +14,11 @@ usage() { printf "usage: %s <tag>\n" "${BASH_SOURCE[0]##*/}"; exit 0; }
|
||||||
|
|
||||||
bail() { printf "error: %s\n" "$1" "${@:2}"; exit 1; }
|
bail() { printf "error: %s\n" "$1" "${@:2}"; exit 1; }
|
||||||
|
|
||||||
[ -z "$1" ] && usage
|
tag=$1
|
||||||
[[ "$1" != v* ]] && bail "tag name should start with 'v'"
|
[ -z "$tag" ] && usage
|
||||||
|
[[ "$tag" != v* ]] && bail "tag name should start with 'v'"
|
||||||
|
|
||||||
changelog=$(git diff -U0 "$changelog_file" | grep '^[+][^+]' | sed 's/^[+]//;s/^###\s*//')
|
changelog=$(git diff -U0 "$changelog_file" | grep '^[+][^+]' | sed 's/^[+]//;s/^###\s*//')
|
||||||
[ -z "$changelog" ] && bail "$changelog_file is not updated"
|
|
||||||
|
|
||||||
sed "s/^version = \".*\" $version_suffix$/version = \"${1#v}\" $version_suffix/g" \
|
sed "s/^version = \".*\" $version_suffix$/version = \"${1#v}\" $version_suffix/g" \
|
||||||
-i -- */Cargo.toml
|
-i -- */Cargo.toml
|
||||||
|
@ -28,11 +28,11 @@ gawk -i inplace \
|
||||||
'/\.TH\s.*+"8".*"System Administration"/{ $4 = date } 1' man*/*
|
'/\.TH\s.*+"8".*"System Administration"/{ $4 = date } 1' man*/*
|
||||||
|
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "$commit_prefix$1"
|
git commit -m "$commit_prefix$tag"
|
||||||
git show
|
git show
|
||||||
|
|
||||||
git -c user.name="$tagger_name" \
|
git -c user.name="$tagger_name" \
|
||||||
-c user.email="$tagger_email" \
|
-c user.email="$tagger_email" \
|
||||||
-c user.signingkey="$signing_key" \
|
-c user.signingkey="$signing_key" \
|
||||||
tag -s -a "$1" -m "$tag_prefix$1" -m "$changelog"
|
tag -s -a "$tag" -m "$tag_prefix$tag" -m "$changelog"
|
||||||
git tag -v "$1"
|
git tag -v "$tag"
|
||||||
|
|
Loading…
Reference in a new issue