aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-15 13:23:48 +0100
committerChocobozzz <me@florianbigard.com>2018-01-15 16:43:37 +0100
commit1e5c707b08b0cb8b61138e583747ec0ce681547b (patch)
tree6e8e2aadd9f0fa5792df36fa68eda4be8e41a210
parent519b8df5f840a9223dd78a83cbc484b0eebef578 (diff)
downloadPeerTube-1e5c707b08b0cb8b61138e583747ec0ce681547b.tar.gz
PeerTube-1e5c707b08b0cb8b61138e583747ec0ce681547b.tar.zst
PeerTube-1e5c707b08b0cb8b61138e583747ec0ce681547b.zip
Add github release to release script
-rw-r--r--config/production.yaml.example16
-rwxr-xr-xscripts/release.sh34
2 files changed, 36 insertions, 14 deletions
diff --git a/config/production.yaml.example b/config/production.yaml.example
index 660477196..c0c1306bd 100644
--- a/config/production.yaml.example
+++ b/config/production.yaml.example
@@ -17,14 +17,14 @@ database:
17 17
18# From the project root directory 18# From the project root directory
19storage: 19storage:
20 avatars: '../storage/avatars/' 20 avatars: '../../storage/avatars/'
21 certs: '../storage/certs/' 21 certs: '../../storage/certs/'
22 videos: '../storage/videos/' 22 videos: '../../storage/videos/'
23 logs: '../storage/logs/' 23 logs: '../../storage/logs/'
24 previews: '../storage/previews/' 24 previews: '../../storage/previews/'
25 thumbnails: '../storage/thumbnails/' 25 thumbnails: '../../storage/thumbnails/'
26 torrents: '../storage/torrents/' 26 torrents: '../../storage/torrents/'
27 cache: '../storage/cache/' 27 cache: '../../storage/cache/'
28 28
29cache: 29cache:
30 previews: 30 previews:
diff --git a/scripts/release.sh b/scripts/release.sh
index aef4327e4..369f46746 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -16,20 +16,42 @@ if [ -z "$1" ]; then
16 exit -1 16 exit -1
17fi 17fi
18 18
19if [ -z $GITHUB_TOKEN ]; then
20 echo "Need GITHUB_TOKEN env set."
21 exit -1
22fi
23
24version="v$1"
25directory_name="peertube-$version"
26zip_name="peertube-$version.zip"
27
19cd ./client || exit -1 28cd ./client || exit -1
20npm version --no-git-tag-version --no-commit-hooks $1 || exit -1 29npm version --no-git-tag-version --no-commit-hooks $1 || exit -1
21 30
22cd ../ || exit -1 31cd ../ || exit -1
23npm version -f --no-git-tag-version --no-commit-hooks $1 || exit -1 32npm version -f --no-git-tag-version --no-commit-hooks $1 || exit -1
24 33
25git commit package.json client/package.json -m "Bumped to version $1" || exit -1 34git commit package.json client/package.json -m "Bumped to version $version" || exit -1
26git tag -s -a "v$1" -m "v$1" 35git tag -s -a "$version" -m "$version"
27 36
28npm run build || exit -1 37npm run build || exit -1
29#npm test || exit -1
30 38
31cd ../ || exit -1 39cd ../ || exit -1
32 40
33ln -s "PeerTube" "peertube-v$1" || exit -1 41ln -s "PeerTube" "$directory_name" || exit -1
34zip -r "PeerTube/peertube-v$1.zip" "peertube-v$1"/{CREDITS.md,FAQ.md,LICENSE,README.md,client/dist/,client/yarn.lock,client/package.json,config,dist,package.json,scripts,support,tsconfig.json,yarn.lock} || exit -1 42zip -r "PeerTube/$zip_name" "$directory_name/CREDITS.md" "$directory_name/FAQ.md" \
35rm "peertube-v$1" || exit -1 43 "$directory_name/LICENSE" "$directory_name/README.md" \
44 "$directory_name/client/dist/" "$directory_name/client/yarn.lock" \
45 "$directory_name/client/package.json" "$directory_name/config" \
46 "$directory_name/dist" "$directory_name/package.json" \
47 "$directory_name/scripts" "$directory_name/support" \
48 "$directory_name/tsconfig.json" "$directory_name/yarn.lock" \
49 || exit -1
50rm "$directory_name" || exit -1
51
52cd "PeerTube" || exit -1
53
54git push origin --tag
55
56github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version"
57github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$version" --file "$zip_name"