File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,9 +17,19 @@ plugins:
1717 numReplacements : 1
1818- - "@semantic-release/exec"
1919 - verifyConditionsCmd : echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
20+ verifyReleaseCmd : |
21+ MAJOR_MINOR_PATCH=${/^((\d+)\.\d+)\.\d+$/.exec(nextRelease.version)}
22+ if [ -z $MAJOR_MINOR_PATCH ]; then echo "Only SemVer versions with version core (major.minor.patch) supported!"; exit 1; fi
2023 prepareCmd : docker build -t $DOCKER_IMAGE:latest .
2124 publishCmd : |
22- docker tag $DOCKER_IMAGE:latest $DOCKER_IMAGE:${nextRelease.version}
25+ MAJOR_MINOR_PATCH=${/^((\d+)\.\d+)\.\d+$/.exec(nextRelease.version)[0]}
26+ MAJOR_MINOR=${ /^((\d+)\.\d+)\.\d+$/.exec(nextRelease.version)[1]}
27+ MAJOR=${ /^((\d+)\.\d+)\.\d+$/.exec(nextRelease.version)[2]}
28+ docker tag $DOCKER_IMAGE:latest $DOCKER_IMAGE:$MAJOR_MINOR_PATCH
29+ docker tag $DOCKER_IMAGE:latest $DOCKER_IMAGE:$MAJOR_MINOR
30+ docker tag $DOCKER_IMAGE:latest $DOCKER_IMAGE:$MAJOR
2331 docker push $DOCKER_IMAGE:latest
24- docker push $DOCKER_IMAGE:${nextRelease.version}
32+ docker push $DOCKER_IMAGE:$MAJOR_MINOR_PATCH
33+ docker push $DOCKER_IMAGE:$MAJOR_MINOR
34+ docker push $DOCKER_IMAGE:$MAJOR
2535 - " @semantic-release/github"
You can’t perform that action at this time.
0 commit comments