Push extra tag to fit go module semver tag format (#1444)

This commit is contained in:
Ta-Ching Chen
2019-11-28 00:40:20 +08:00
committed by GitHub
parent 1ad7ac2dcf
commit 5cfc8dee5e
2 changed files with 20 additions and 12 deletions
+2 -3
View File
@@ -75,8 +75,7 @@ a. Switch to fission/fission-charts repo and run `index.sh` in that repo. (Don'
b. You should have index.yaml and fission-core-*, fission-all-* charts as change, add, commit and push it to repo. b. You should have index.yaml and fission-core-*, fission-all-* charts as change, add, commit and push it to repo.
9. Go to Github Web UI --> Releases, here you will notice a pre-release for the version x.y.z you just created.
8. Go to Github Web UI --> Releases, here you will notice a pre-release for the version x.y.z you just created.
Edit it and add links to: Edit it and add links to:
@@ -88,7 +87,7 @@ Before you save the release - UNCHECK the "This is a pre-release" checkbox. This
Updating Fission Docs (https://github.com/fission/docs.fission.io) Updating Fission Docs (https://github.com/fission/docs.fission.io)
------------------------------ ------------------------------
9. Documentation Update 10. Documentation Update
a. Merge documentation PRs that are peer reviewed and get latest master locally. a. Merge documentation PRs that are peer reviewed and get latest master locally.
+18 -9
View File
@@ -14,8 +14,8 @@ check_branch() {
curr_branch=$(git rev-parse --abbrev-ref HEAD) curr_branch=$(git rev-parse --abbrev-ref HEAD)
if [ $curr_branch != "release-${version}" ] if [ $curr_branch != "release-${version}" ]
then then
echo "Not on release-${version} branch." echo "Not on release-${version} branch."
exit 1 exit 1
fi fi
} }
@@ -23,8 +23,8 @@ check_branch() {
check_clean() { check_clean() {
if ! git diff-index --quiet HEAD -- if ! git diff-index --quiet HEAD --
then then
echo "Unclean tree" echo "Unclean tree"
exit 1 exit 1
fi fi
} }
@@ -150,13 +150,22 @@ push_all() {
tag_and_release() { tag_and_release() {
local version=$1 local version=$1
local gittag="v${version}" local gittag=$version
local prefix="v"
local gopkgtag=${version/#/${prefix}}
if [[ ${version} == v* ]]; # if version starts with "v", don't append prefix.
then
gopkgtag=${version}
fi
# tag the release # tag the release
git tag $gittag git tag $gittag
git tag -a $gopkgtag -m "Fission $gopkgtag"
# push tag # push tag
git push origin $gittag git push origin $gittag
git push origin $gopkgtag
# create gh release # create gh release
gothub release \ gothub release \
@@ -170,7 +179,7 @@ tag_and_release() {
attach_github_release_cli() { attach_github_release_cli() {
local version=$1 local version=$1
local gittag="v${version}" local gittag=$version
# cli # cli
echo "Uploading osx cli" echo "Uploading osx cli"
gothub upload \ gothub upload \
@@ -202,7 +211,7 @@ attach_github_release_cli() {
attach_github_release_charts() { attach_github_release_charts() {
local version=$1 local version=$1
local gittag="v${version}" local gittag=$version
# helm charts # helm charts
gothub upload \ gothub upload \
@@ -225,7 +234,7 @@ attach_github_release_charts() {
attach_github_release_yamls() { attach_github_release_yamls() {
local version=$1 local version=$1
local gittag="v${version}" local gittag=$version
for c in fission-all fission-core for c in fission-all fission-core
do do