2022-07-27 23:33:53 +03:00
|
|
|
#!/usr/bin/env bash
|
2022-04-18 12:35:14 +03:00
|
|
|
set -xeuo pipefail
|
|
|
|
|
|
|
|
cd "$(git rev-parse --show-toplevel)"
|
2022-04-20 14:45:48 +03:00
|
|
|
prev_ref=$(git rev-parse HEAD)
|
|
|
|
git commit --allow-empty -m "this is a test commit"
|
2022-04-18 12:35:14 +03:00
|
|
|
./release --nosign v99.0
|
2022-04-20 14:45:48 +03:00
|
|
|
cleanup() { git tag -d v99.0; git reset --hard "$prev_ref"; }
|
2022-04-18 12:35:14 +03:00
|
|
|
trap cleanup EXIT
|
2022-04-18 12:35:14 +03:00
|
|
|
|
|
|
|
want=" 1 file changed, 2 insertions(+), 2 deletions(-)"
|
|
|
|
got=$(git show --shortstat HEAD | tail -1)
|
|
|
|
|
|
|
|
if [[ "$want" != "$got" ]]; then
|
|
|
|
echo wanted:
|
|
|
|
echo \ \ "$want"
|
|
|
|
echo got:
|
|
|
|
echo \ \ "$got"
|
|
|
|
exit 1
|
|
|
|
fi
|