Skip to content
Code-Schnipsel Gruppen Projekte
Commit 4b3e303d erstellt von Jan Wennrich's avatar Jan Wennrich
Dateien durchsuchen

Merge branch 'test-release' into 'main'

fix: another release

See merge request !114
Übergeordnete 56eede35 13bfa309
No related branches found
No related tags found
1 Merge Request!114fix: another release
Pipeline #8191 bestanden mit Phase
in 6 Sekunden
......@@ -8,13 +8,16 @@ release:
script:
- git config --global --add safe.directory $CI_PROJECT_DIR
- CURRENT_VERSION=$(git describe --abbrev=0 --tags | cut -c1 || echo "0.0.0")
- echo $CURRENT_VERSION
- CURRENT_MAJOR_VERSION=$(echo ${CURRENT_VERSION} | cut -c1)
- echo $CURRENT_MAJOR_VERSION
- if [ ! -e .releaserc.json ]; then (echo '
{"tagFormat":"${version}","branches":["+([0-9])?(.{+([0-9]),x}).x","master","main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits"}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits"}],["@semantic-release/gitlab",{"gitlabUrl":"https://dev.quiqqer.com","assignee":"JanWennrich"}]]}
' > .releaserc.json); fi
- semantic-release
- RELEASED_MAJOR_VERSION=$(git describe --abbrev=0 --tags | cut -c1)
- if [ $CURRENT_MAJOR_VERSION -gt 0 ] && [ $RELEASED_MAJOR_VERSION -gt $CURRENT_MAJOR_VERSION ]; then (curl -v --request POST --header "PRIVATE-TOKEN:${GITLAB_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/repository/branches?branch=${CURRENT_MAJOR_VERSION}.x&ref=${CURRENT_VERSION}"); fi
- echo $RELEASED_MAJOR_VERSION
- if [ "$CURRENT_MAJOR_VERSION" -gt 0 ] && [ "$RELEASED_MAJOR_VERSION" -gt "$CURRENT_MAJOR_VERSION" ]; then (curl -v --request POST --header "PRIVATE-TOKEN:${GITLAB_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/repository/branches?branch=${CURRENT_MAJOR_VERSION}.x&ref=${CURRENT_VERSION}"); fi
rules:
# Execute for default branch (should be master/main) and for version branches ('n.x' or 'n.n.x', where n is a number)
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren