mirror of
https://framagit.org/framasoft/framadate/framadate
synced 2026-01-22 18:04:15 +00:00
Add release file
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
fb04860c78
commit
ac932e55f6
1 changed files with 23 additions and 0 deletions
23
release.sh
Executable file
23
release.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Need version as argument"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
version="$1"
|
||||
changelog=$(awk -v version="$version" '/^## / { printit = $2 == version }; printit' CHANGELOG.md | grep -v "## $version" | sed '1{/^$/d}')
|
||||
|
||||
printf "Changelog will be:\\n\\n%s\\n\\n" "$changelog"
|
||||
|
||||
read -p "Are you sure to release? " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git tag -s -a "$version" -m "$changelog"
|
||||
|
||||
git push origin "$version"
|
||||
Loading…
Add table
Add a link
Reference in a new issue