Skip to content

Commit

Permalink
Merge pull request #39 from cofyc/improve-releasing-script
Browse files Browse the repository at this point in the history
Improve releasing script
  • Loading branch information
k8s-ci-robot committed Jan 14, 2019
2 parents 61809e7 + 7c2f130 commit 235c8b8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions hack/release.sh
Expand Up @@ -91,8 +91,8 @@ if [ -z "$ALLOW_DIRTY" -a "$GIT_DIRTY" != "clean" ]; then
fi

# our logic depends repo tags, make sure all tags are fetched
echo "info: fetching all tags"
git fetch --tags
echo "info: fetching all tags from official upstream"
git fetch --tags https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner.git

if [ -z "$VERSION" ]; then
echo "info: VERSION is not specified, detect automatically"
Expand Down Expand Up @@ -179,8 +179,8 @@ function is_latest_version() {
}

if ! is_stable_version "$VERSION"; then
echo "error: VERSION '$VERSION' is not stable version, skipped pushing as latest image"
exit 1
echo "info: VERSION '$VERSION' is not stable version, skip pushing as latest image"
exit 0
fi

latest_stable_version=$(git tag -l | grep -P '^v\d\.\d+\.\d+' | sort --version-sort | tail -n -1)
Expand All @@ -190,8 +190,8 @@ if [ -z "$latest_stable_version" ]; then
fi

if [ "$VERSION" != "$latest_stable_version" ]; then
echo "error: VERSION '$VERSION' is not latest stable version '$latest_stable_version', skiiped pushing as latest image"
exit 1
echo "info: VERSION '$VERSION' is not latest stable version '$latest_stable_version', skip pushing as latest image"
exit 0
fi

echo "info: VERSION '$VERSION' is latest stable version, pushing it as latest image"
Expand Down

0 comments on commit 235c8b8

Please sign in to comment.