This repository has been archived by the owner on Dec 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
[skip] Fixes to keep pipelines consistency #61
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kyfujisa
changed the title
Fixes to keep pipelines consistency
[skip] Fixes to keep pipelines consistency
May 25, 2020
I think this issue has something to do with the failure of the pipeline. |
@kyfujisa please update the docker version in pipeline. |
Codecov Report
@@ Coverage Diff @@
## master #61 +/- ##
=======================================
Coverage 87.02% 87.02%
=======================================
Files 14 14
Lines 655 655
=======================================
Hits 570 570
Misses 75 75
Partials 10 10 Continue to review full report at Codecov.
|
WindzCUHK
reviewed
May 26, 2020
try to simply the logic as below
#!/bin/sh
# LAST_COMMIT="$(git log -1 --pretty=%B)"
LAST_COMMIT="$1"
# if [ ! -z $CIRCLE_PULL_REQUEST ]; then
# PR_NUM="${CIRCLE_PULL_REQUEST##*/}"
# LAST_COMMIT=`curl -s ${GITHUB_API}repos/${REPO_NAME}/${IMAGE_NAME}/pulls/${PR_NUM} | jq .title`
# fi
touch ./.tag
# VERSION="$(git describe --abbrev=0 --tags)"
VERSION="$2"
# if [ -n "$(git diff $VERSION)" ]; then
if [ -n "$3" ]; then
VERSION=${VERSION:-'v0.0.0'}
MAJOR="${VERSION%%.*}"; MAJOR="${MAJOR#v}"; VERSION="${VERSION#*.}"
MINOR="${VERSION%%.*}"; VERSION="${VERSION#*.}"
PATCH="${VERSION%%.*}"; VERSION="${VERSION#*.}"
case "$LAST_COMMIT" in
'[patch]'*)
PATCH=$((PATCH+1))
echo "v$MAJOR.$MINOR.$PATCH" > ./.tag
;;
'[minor]'*)
MINOR=$((MINOR+1))
echo "v$MAJOR.$MINOR.0" > ./.tag
;;
'[major]'*)
MAJOR=$((MAJOR+1))
echo "v$MAJOR.0.0" > ./.tag
;;
'[skip]'*)
echo "Skip release..."
;;
'[skip ci]'* | '[ci skip]'*)
echo "Will skip CI..."
;;
*)
echo "Required prefixes: [major]/[minor]/[patch]/[skip]/[skip ci]"
exit 1
esac
else
echo "NO diff, skip tagging..."
fi
cat ./.tag
rm ./.tag
exit 0 output $ sh case.sh '[patch] commit' v1.1.1 diff
v1.1.2
$ sh case.sh '[minor] commit' v1.1.1 diff
v1.2.0
$ sh case.sh '[major] commit' v1.1.1 diff
v2.0.0
$ sh case.sh '[skip] commit' v1.1.1 diff
Skip release...
$ sh case.sh '[skip ci] commit' v1.1.1 diff
Will skip CI...
$ sh case.sh '[-] commit' v1.1.1 diff
Required prefixes: [major]/[minor]/[patch]/[skip]/[skip ci]
$ echo $?
1
$ sh case.sh '[patch] commit' v1.1.1 ""
NO diff, skip tagging...
$ sh case.sh '[patch] commit' '' 'diff'
v0.0.1
$ sh case.sh '[minor] commit' '' 'diff'
v0.1.0
$ sh case.sh '[major] commit' '' 'diff'
v1.0.0
$ sh case.sh '[major] commit' 'v2.0.2' 'diff'
v3.0.0
$ sh case.sh '[minor] commit' 'v2.0.2' 'diff'
v2.1.0
$ sh case.sh '[patch] commit' 'v2.0.2' 'diff'
v2.0.3 |
kyfujisa
changed the title
[skip] Fixes to keep pipelines consistency
[patch] Fixes to keep pipelines consistency
May 28, 2020
This reverts commit 23a3dbb.
kyfujisa
changed the title
[patch] Fixes to keep pipelines consistency
[skip] Fixes to keep pipelines consistency
May 28, 2020
WindzCUHK
changed the title
[skip] Fixes to keep pipelines consistency
[fail] Fixes to keep pipelines consistency
May 29, 2020
WindzCUHK
changed the title
[fail] Fixes to keep pipelines consistency
[skip ci] Fixes to keep pipelines consistency
May 29, 2020
WindzCUHK
changed the title
[skip ci] Fixes to keep pipelines consistency
[SKIP] Fixes to keep pipelines consistency
May 29, 2020
WindzCUHK
changed the title
[SKIP] Fixes to keep pipelines consistency
[major] Fixes to keep pipelines consistency
May 29, 2020
WindzCUHK
changed the title
[major] Fixes to keep pipelines consistency
[skip] Fixes to keep pipelines consistency
May 29, 2020
WindzCUHK
approved these changes
May 29, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As a fix to keep pipelines consistent, the first step.
confirmation
test.sh
check