aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/release.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/release.sh')
-rwxr-xr-xscripts/release.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/release.sh b/scripts/release.sh
index 7b577ef35..08061fe6f 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -27,15 +27,15 @@ fi
27maintainer_public_key=${MAINTAINER_GPG:-"583A612D890159BE"} 27maintainer_public_key=${MAINTAINER_GPG:-"583A612D890159BE"}
28 28
29branch=$(git symbolic-ref --short -q HEAD) 29branch=$(git symbolic-ref --short -q HEAD)
30if [ "$branch" != "develop" ] && [[ "$branch" != feature/* ]]; then 30if [ "$branch" != "develop" ] && [[ "$branch" != release/* ]]; then
31 echo "Need to be on develop or release branch." 31 echo "Need to be on develop or release branch."
32 exit -1 32 exit -1
33fi 33fi
34 34
35version="v$1" 35version="v$1"
36github_prerelease_option="" 36github_prerelease_option=""
37if [[ "$version" = *".pre."* ]]; then 37if [[ "$version" = *"-alpha."* ]] || [[ "$version" = *"-beta."* ]] || [[ "$version" = *"-rc."* ]]; then
38 echo "This is a pre-release." 38 echo -e "This is a pre-release.\n"
39 github_prerelease_option="--pre-release" 39 github_prerelease_option="--pre-release"
40fi 40fi
41 41
@@ -43,9 +43,9 @@ directory_name="peertube-$version"
43zip_name="peertube-$version.zip" 43zip_name="peertube-$version.zip"
44tar_name="peertube-$version.tar.xz" 44tar_name="peertube-$version.tar.xz"
45 45
46changelog=$(awk -v version="$version" '/## v/ { printit = $2 == version }; printit;' CHANGELOG.md | grep -v "$version" | sed '1{/^$/d}') 46changelog=$(awk -v version="$version" '/## v/ { printit = $2 == version }; printit;' CHANGELOG.md | grep -v "## $version" | sed '1{/^$/d}')
47 47
48printf "Changelog will be:\\n%s\\n" "$changelog" 48printf "Changelog will be:\\n\\n%s\\n\\n" "$changelog"
49 49
50read -p "Are you sure to release? " -n 1 -r 50read -p "Are you sure to release? " -n 1 -r
51echo 51echo
@@ -60,7 +60,9 @@ fi
60 60
61npm version -f --no-git-tag-version --no-commit-hooks "$1" 61npm version -f --no-git-tag-version --no-commit-hooks "$1"
62 62
63git commit package.json client/package.json -m "Bumped to version $version" 63./scripts/openapi-peertube-version.sh
64
65git commit package.json client/package.json ./support/doc/api/openapi.yaml -m "Bumped to version $version"
64git tag -s -a "$version" -m "$version" 66git tag -s -a "$version" -m "$version"
65 67
66npm run build 68npm run build