diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-15 15:59:48 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-15 15:59:48 +0100 |
commit | e33b53abb397fd4d3e7e94829f2099601f03657c (patch) | |
tree | 04bc57117836642ad98c8cd69f3c09161e909e6a /scripts/release.sh | |
parent | 2422c46b27790d94fd29a7092170cee5a1b56008 (diff) | |
download | PeerTube-e33b53abb397fd4d3e7e94829f2099601f03657c.tar.gz PeerTube-e33b53abb397fd4d3e7e94829f2099601f03657c.tar.zst PeerTube-e33b53abb397fd4d3e7e94829f2099601f03657c.zip |
Handle changelog in release
Diffstat (limited to 'scripts/release.sh')
-rwxr-xr-x | scripts/release.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/release.sh b/scripts/release.sh index 0e288a49c..d9ad6c54b 100755 --- a/scripts/release.sh +++ b/scripts/release.sh | |||
@@ -31,6 +31,19 @@ version="v$1" | |||
31 | directory_name="peertube-$version" | 31 | directory_name="peertube-$version" |
32 | zip_name="peertube-$version.zip" | 32 | zip_name="peertube-$version.zip" |
33 | 33 | ||
34 | changelog=$(awk -v version="$version" '/## v/ { printit = $2 == version }; printit;' CHANGELOG.md | grep -v "$version" | sed '1{/^$/d}') | ||
35 | |||
36 | echo "Changelog will be:\n" | ||
37 | echo "$changelog" | ||
38 | echo | ||
39 | |||
40 | read -p "Are you sure to release? " -n 1 -r | ||
41 | echo | ||
42 | if [[ ! $REPLY =~ ^[Yy]$ ]] | ||
43 | then | ||
44 | [[ "$0" = "$BASH_SOURCE" ]] && exit 0 | ||
45 | fi | ||
46 | |||
34 | cd ./client || exit -1 | 47 | cd ./client || exit -1 |
35 | npm version --no-git-tag-version --no-commit-hooks $1 || exit -1 | 48 | npm version --no-git-tag-version --no-commit-hooks $1 || exit -1 |
36 | 49 | ||
@@ -60,7 +73,7 @@ cd "PeerTube" || exit -1 | |||
60 | 73 | ||
61 | git push origin --tag | 74 | git push origin --tag |
62 | 75 | ||
63 | github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version" | 76 | github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version" --description "$changelog" |
64 | github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name" --file "$zip_name" | 77 | github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name" --file "$zip_name" |
65 | 78 | ||
66 | git push origin develop | 79 | git push origin develop |