fix json error

This commit is contained in:
2025-08-19 10:12:18 +02:00
parent c4aebef5dc
commit 31c2910c93
+24 -30
View File
@@ -76,41 +76,35 @@ sonarcloud_scan:
perform_release: perform_release:
stage: release stage: release
script: script: |
- cd ${GITLAB_CLONE_DIR} cd ${GITLAB_CLONE_DIR}
- git config --global user.name "${GITLAB_USERNAME}" git config --global user.name "${GITLAB_USERNAME}"
- git config --global user.email "${GITLAB_USEREMAIL}" git config --global user.email "${GITLAB_USEREMAIL}"
git remote set-url origin "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git"
# config git auth CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
- git remote set-url origin "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git" RELEASE_VERSION=$(echo $CURRENT_VERSION | sed 's/-SNAPSHOT//')
MINOR_VERSION=$(echo $RELEASE_VERSION | awk -F. '{print $2}')
NEXT_MINOR_VERSION=$((MINOR_VERSION + 1))
NEXT_VERSION=$(echo $RELEASE_VERSION | awk -F. -v minor="$NEXT_MINOR_VERSION" '{print $1"."minor".0-SNAPSHOT"}')
# build versions ... echo "current version: $CURRENT_VERSION"
- CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) echo "release version: $RELEASE_VERSION"
- RELEASE_VERSION=$(echo $CURRENT_VERSION | sed 's/-SNAPSHOT//') echo "next version: $NEXT_VERSION"
- MINOR_VERSION=$(echo $RELEASE_VERSION | awk -F. '{print $2}')
- NEXT_MINOR_VERSION=$((MINOR_VERSION + 1))
- NEXT_VERSION=$(echo $RELEASE_VERSION | awk -F. -v minor="$NEXT_MINOR_VERSION" '{print $1"."minor".0-SNAPSHOT"}')
- echo "current version: $CURRENT_VERSION" mvn release:clean release:prepare release:perform \
- echo "release version: $RELEASE_VERSION" -B \
- echo "next version: $NEXT_VERSION" -DreleaseVersion=$RELEASE_VERSION \
-DdevelopmentVersion=$NEXT_VERSION \
# process maven release ... -Darguments="-DskipTests" \
- > -DscmCommentPrefix="[ci skip] " \
mvn release:clean release:prepare release:perform
-B
-DreleaseVersion=$RELEASE_VERSION
-DdevelopmentVersion=$NEXT_VERSION
-Darguments="-DskipTests"
-DscmCommentPrefix="[ci skip] "
-DpreparationGoals="clean verify" -DpreparationGoals="clean verify"
# generate release curl --header "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" \
- > --data "name=v${RELEASE_VERSION}" \
curl --header "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" --data "tag_name=v${RELEASE_VERSION}" \
--data "name=v${RELEASE_VERSION}" --data "description=Release v${RELEASE_VERSION} of CloudflareDNS-java" \
--data "tag_name=v${RELEASE_VERSION}"
--data "description=Release v${RELEASE_VERSION} of CloudflareDNS-java"
"https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/releases" "https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/releases"
only: only:
- /^v\d+\.\d+\.\d+$/ - /^v\d+\.\d+\.\d+$/