cat "$PATCH_DIR"/taglist.log
popd
+ # Verify allowed versions
+ # Allowed versions are "v#.#.#" or "#.#.#" aka SemVer
+ allowed_version_regex="^((v?)([0-9]+)\.([0-9]+)\.([0-9]+))$"
+ if [[ ! $VERSION =~ $allowed_version_regex ]]; then
+ echo "The version $VERSION is not a semantic valid version"
+ echo "Allowed versions are "v#.#.#" or "#.#.#" aka SemVer"
+ echo "See https://semver.org/ for more details on SemVer"
+ exit 1
+ fi
+
git checkout "$(awk '{print $NF}' "$PATCH_DIR/taglist.log")"
git fetch "$PATCH_DIR/$PROJECT.bundle"
git merge --ff-only FETCH_HEAD
- git tag -am "$PROJECT $VERSION" "v$VERSION"
- sigul --batch -c "$SIGUL_CONFIG" sign-git-tag "$SIGUL_KEY" v"$VERSION" < "$SIGUL_PASSWORD"
+ git tag -am "$PROJECT $VERSION" "$VERSION"
+ sigul --batch -c "$SIGUL_CONFIG" sign-git-tag "$SIGUL_KEY" "$VERSION" < "$SIGUL_PASSWORD"
echo "Showing latest signature for $PROJECT:"
git log --show-signature -n1
########## Merge Part ##############
if [[ "$JOB_NAME" =~ "merge" ]]; then
echo "Running merge"
- git push origin "v$VERSION"
+ git push origin "$VERSION"
lftools nexus release --server "$NEXUS_URL" "$STAGING_REPO"
if [ "${MAVEN_CENTRAL_URL}" == 'None' ]; then
echo "No Maven central url specified, not pushing to maven central"