diff options
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 |