aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorRigel <sendmemail@rigelk.eu>2018-03-29 15:11:15 +0200
committerChocobozzz <me@florianbigard.com>2018-03-30 17:13:24 +0200
commit6c42d96e4692030eb68dd60bbc61475f909d404e (patch)
treef21ec37f96ff44e33fe56f0e292b7e96e92a6afa /scripts
parent2922e048de95738b3319054ce0778f873a34a0ee (diff)
downloadPeerTube-6c42d96e4692030eb68dd60bbc61475f909d404e.tar.gz
PeerTube-6c42d96e4692030eb68dd60bbc61475f909d404e.tar.zst
PeerTube-6c42d96e4692030eb68dd60bbc61475f909d404e.zip
modified scripts/release.sh to add tar.xz and provide archive signatures
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release.sh69
1 files changed, 44 insertions, 25 deletions
diff --git a/scripts/release.sh b/scripts/release.sh
index 6f4da6a29..dbc348cb2 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -4,6 +4,7 @@ set -eu
4 4
5shutdown() { 5shutdown() {
6 # Get our process group id 6 # Get our process group id
7 # shellcheck disable=SC2009
7 PGID=$(ps -o pgid= $$ | grep -o "[0-9]*") 8 PGID=$(ps -o pgid= $$ | grep -o "[0-9]*")
8 9
9 # Kill it in a new new process group 10 # Kill it in a new new process group
@@ -32,10 +33,11 @@ fi
32version="v$1" 33version="v$1"
33directory_name="peertube-$version" 34directory_name="peertube-$version"
34zip_name="peertube-$version.zip" 35zip_name="peertube-$version.zip"
36tar_name="peertube-$version.tar.xz"
35 37
36changelog=$(awk -v version="$version" '/## v/ { printit = $2 == version }; printit;' CHANGELOG.md | grep -v "$version" | sed '1{/^$/d}') 38changelog=$(awk -v version="$version" '/## v/ { printit = $2 == version }; printit;' CHANGELOG.md | grep -v "$version" | sed '1{/^$/d}')
37 39
38printf "Changelog will be:\n%s\n" "$changelog" 40printf "Changelog will be:\\n%s\\n" "$changelog"
39 41
40read -p "Are you sure to release? " -n 1 -r 42read -p "Are you sure to release? " -n 1 -r
41echo 43echo
@@ -44,7 +46,8 @@ then
44 exit 0 46 exit 0
45fi 47fi
46 48
47( cd client 49(
50 cd client
48 npm version --no-git-tag-version --no-commit-hooks "$1" 51 npm version --no-git-tag-version --no-commit-hooks "$1"
49) 52)
50 53
@@ -56,31 +59,47 @@ git tag -s -a "$version" -m "$version"
56npm run build 59npm run build
57rm "./client/dist/stats.json" 60rm "./client/dist/stats.json"
58 61
59cd .. 62# Creating the archives
60 63(
61ln -s "PeerTube" "$directory_name" 64 cd ..
62zip -r "PeerTube/$zip_name" "$directory_name/CREDITS.md" "$directory_name/FAQ.md" \ 65 ln -s "PeerTube" "$directory_name"
63 "$directory_name/LICENSE" "$directory_name/README.md" \ 66 zip -r "PeerTube/$zip_name" "$directory_name/CREDITS.md" "$directory_name/FAQ.md" \
64 "$directory_name/client/dist/" "$directory_name/client/yarn.lock" \ 67 "$directory_name/LICENSE" "$directory_name/README.md" \
65 "$directory_name/client/package.json" "$directory_name/config" \ 68 "$directory_name/client/dist/" "$directory_name/client/yarn.lock" \
66 "$directory_name/dist" "$directory_name/package.json" \ 69 "$directory_name/client/package.json" "$directory_name/config" \
67 "$directory_name/scripts" "$directory_name/support" \ 70 "$directory_name/dist" "$directory_name/package.json" \
68 "$directory_name/tsconfig.json" "$directory_name/yarn.lock" 71 "$directory_name/scripts" "$directory_name/support" \
69 72 "$directory_name/tsconfig.json" "$directory_name/yarn.lock"
70rm "$directory_name" 73 gpg --armor --detach-sign -u 583A612D890159BE "PeerTube/$zip_name"
71 74 tar cfJ "PeerTube/$tar_name" "$directory_name/CREDITS.md" "$directory_name/FAQ.md" \
72cd "PeerTube" 75 "$directory_name/LICENSE" "$directory_name/README.md" \
76 "$directory_name/client/dist/" "$directory_name/client/yarn.lock" \
77 "$directory_name/client/package.json" "$directory_name/config" \
78 "$directory_name/dist" "$directory_name/package.json" \
79 "$directory_name/scripts" "$directory_name/support" \
80 "$directory_name/tsconfig.json" "$directory_name/yarn.lock"
81 gpg --armor --detach-sign -u 583A612D890159BE "PeerTube/$tar_name"
82
83 rm "$directory_name"
84)
73 85
74git push origin --tag 86# Creating the release on GitHub, with the created archives
87(
88 cd "PeerTube"
75 89
76github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version" --description "$changelog" 90 git push origin --tag
77github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name" --file "$zip_name"
78 91
79git push origin develop 92 github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version" --description "$changelog"
93 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name" --file "$zip_name"
94 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name.asc" --file "$zip_name.asc"
95 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$tar_name" --file "$tar_name"
96 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$tar_name.asc" --file "$tar_name.asc"
80 97
81# Update master branch 98 git push origin develop
82git checkout master
83git rebase develop
84git push origin master
85git checkout develop
86 99
100 # Update master branch
101 git checkout master
102 git rebase develop
103 git push origin master
104 git checkout develop
105)