]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/release.sh
Add warning in production guide
[github/Chocobozzz/PeerTube.git] / scripts / release.sh
index 2864232a4b3ee5800e53c5157ea9c4cdbf8f5a62..0e288a49c526e6d3b8d67841af851d10efdfc635 100755 (executable)
@@ -21,6 +21,12 @@ if [ -z $GITHUB_TOKEN ]; then
   exit -1
 fi
 
+branch=$(git symbolic-ref --short -q HEAD)
+if [ "$branch" != "develop" ]; then
+  echo "Need to be on develop branch."
+  exit -1
+fi
+
 version="v$1"
 directory_name="peertube-$version"
 zip_name="peertube-$version.zip"
@@ -35,6 +41,7 @@ git commit package.json client/package.json -m "Bumped to version $version" || e
 git tag -s -a "$version" -m "$version"
 
 npm run build || exit -1
+rm "./client/dist/stats.json" || exit -1
 
 cd ../ || exit -1
 
@@ -55,3 +62,12 @@ git push origin --tag
 
 github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version"
 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name" --file "$zip_name"
+
+git push origin develop
+
+# Update master branch
+git checkout master
+git rebase develop
+git push origin master
+git checkout develop
+