diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-11 11:52:34 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 11:52:34 +0100 |
commit | 88108880bbdba473cfe36ecbebc1c3c4f972e102 (patch) | |
tree | b242efb3b4f0d7e49d88f2d1f2063b5b3b0489c0 /scripts/release.sh | |
parent | 53a94c7cfa8368da4cd248d65df8346905938f0c (diff) | |
parent | 9b712a2017e4ab3cf12cd6bd58278905520159d0 (diff) | |
download | PeerTube-88108880bbdba473cfe36ecbebc1c3c4f972e102.tar.gz PeerTube-88108880bbdba473cfe36ecbebc1c3c4f972e102.tar.zst PeerTube-88108880bbdba473cfe36ecbebc1c3c4f972e102.zip |
Merge branch 'develop' into pr/1217
Diffstat (limited to 'scripts/release.sh')
-rwxr-xr-x | scripts/release.sh | 14 |
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 | |||
27 | maintainer_public_key=${MAINTAINER_GPG:-"583A612D890159BE"} | 27 | maintainer_public_key=${MAINTAINER_GPG:-"583A612D890159BE"} |
28 | 28 | ||
29 | branch=$(git symbolic-ref --short -q HEAD) | 29 | branch=$(git symbolic-ref --short -q HEAD) |
30 | if [ "$branch" != "develop" ] && [[ "$branch" != feature/* ]]; then | 30 | if [ "$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 |
33 | fi | 33 | fi |
34 | 34 | ||
35 | version="v$1" | 35 | version="v$1" |
36 | github_prerelease_option="" | 36 | github_prerelease_option="" |
37 | if [[ "$version" = *".pre."* ]]; then | 37 | if [[ "$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" |
40 | fi | 40 | fi |
41 | 41 | ||
@@ -43,9 +43,9 @@ directory_name="peertube-$version" | |||
43 | zip_name="peertube-$version.zip" | 43 | zip_name="peertube-$version.zip" |
44 | tar_name="peertube-$version.tar.xz" | 44 | tar_name="peertube-$version.tar.xz" |
45 | 45 | ||
46 | changelog=$(awk -v version="$version" '/## v/ { printit = $2 == version }; printit;' CHANGELOG.md | grep -v "$version" | sed '1{/^$/d}') | 46 | changelog=$(awk -v version="$version" '/## v/ { printit = $2 == version }; printit;' CHANGELOG.md | grep -v "## $version" | sed '1{/^$/d}') |
47 | 47 | ||
48 | printf "Changelog will be:\\n%s\\n" "$changelog" | 48 | printf "Changelog will be:\\n\\n%s\\n\\n" "$changelog" |
49 | 49 | ||
50 | read -p "Are you sure to release? " -n 1 -r | 50 | read -p "Are you sure to release? " -n 1 -r |
51 | echo | 51 | echo |
@@ -60,7 +60,9 @@ fi | |||
60 | 60 | ||
61 | npm version -f --no-git-tag-version --no-commit-hooks "$1" | 61 | npm version -f --no-git-tag-version --no-commit-hooks "$1" |
62 | 62 | ||
63 | git commit package.json client/package.json -m "Bumped to version $version" | 63 | ./scripts/openapi-peertube-version.sh |
64 | |||
65 | git commit package.json client/package.json ./support/doc/api/openapi.yaml -m "Bumped to version $version" | ||
64 | git tag -s -a "$version" -m "$version" | 66 | git tag -s -a "$version" -m "$version" |
65 | 67 | ||
66 | npm run build | 68 | npm run build |