release: a better changelog
This commit is contained in:
parent
4408a9e005
commit
1c46fb8617
6
release
6
release
@ -6,8 +6,8 @@ _err(){ >&2 echo "ERROR: $*"; exit 1; }
|
|||||||
git status --porcelain | grep -q "" &&
|
git status --porcelain | grep -q "" &&
|
||||||
_err "working tree is dirty, commit your changes first."
|
_err "working tree is dirty, commit your changes first."
|
||||||
|
|
||||||
[[ "$1" =~ ^v([0-9]+)\.([0-9]+)(\.([0-9]+))?$ ]] || \
|
[[ "$1" =~ ^v([0-9]+)\.([0-9]+)(\.([0-9]+))?(-rc([0-9]+))?$ ]] || \
|
||||||
_err "arg1 accepts the following formats: v1.0 v1.0.0"
|
_err "arg1 accepts the following formats: v1.0 v1.0.0 v1.0-rc1 v1.0.1-rc1"
|
||||||
|
|
||||||
git tag | grep -q "^$1$" &&
|
git tag | grep -q "^$1$" &&
|
||||||
_err "tag $1 already exists"
|
_err "tag $1 already exists"
|
||||||
@ -21,5 +21,5 @@ last_tag=$(git tag | tail -1)
|
|||||||
echo undocker "$1"
|
echo undocker "$1"
|
||||||
echo
|
echo
|
||||||
echo Changelog since "$last_tag":
|
echo Changelog since "$last_tag":
|
||||||
git log --pretty=format:"- [%cn] %s" "$last_tag"..HEAD
|
git log --pretty=format:"- [%an] %s" "$last_tag"..HEAD
|
||||||
} | git tag -u motiejus@jakstys.lt -F - "$1"
|
} | git tag -u motiejus@jakstys.lt -F - "$1"
|
||||||
|
Loading…
Reference in New Issue
Block a user