Fix: bump-version Reihenfolge - erst checkout, dann VERSION ändern
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fa4b379a90
commit
4947191cb3
1 changed files with 7 additions and 7 deletions
|
|
@ -113,6 +113,13 @@ bump-version:
|
||||||
script:
|
script:
|
||||||
- apk add --no-cache git
|
- apk add --no-cache git
|
||||||
- |
|
- |
|
||||||
|
git config user.name "GitLab CI"
|
||||||
|
git config user.email "ci@adriahub.de"
|
||||||
|
git remote set-url origin "http://oauth2:${CI_PUSH_TOKEN}@192.168.1.100:9080/${CI_PROJECT_PATH}.git"
|
||||||
|
git fetch origin main
|
||||||
|
git checkout -f main
|
||||||
|
git pull --rebase origin main
|
||||||
|
|
||||||
VERSION=$(cat VERSION)
|
VERSION=$(cat VERSION)
|
||||||
MAJOR=$(echo "$VERSION" | cut -d. -f1)
|
MAJOR=$(echo "$VERSION" | cut -d. -f1)
|
||||||
MINOR=$(echo "$VERSION" | cut -d. -f2)
|
MINOR=$(echo "$VERSION" | cut -d. -f2)
|
||||||
|
|
@ -123,13 +130,6 @@ bump-version:
|
||||||
echo "$NEXT_VERSION" > VERSION
|
echo "$NEXT_VERSION" > VERSION
|
||||||
echo "Bumped version: $VERSION -> $NEXT_VERSION"
|
echo "Bumped version: $VERSION -> $NEXT_VERSION"
|
||||||
|
|
||||||
git config user.name "GitLab CI"
|
|
||||||
git config user.email "ci@adriahub.de"
|
|
||||||
git remote set-url origin "http://oauth2:${CI_PUSH_TOKEN}@192.168.1.100:9080/${CI_PROJECT_PATH}.git"
|
|
||||||
git fetch origin main
|
|
||||||
git checkout main
|
|
||||||
git pull --rebase origin main
|
|
||||||
echo "$NEXT_VERSION" > VERSION
|
|
||||||
git add VERSION
|
git add VERSION
|
||||||
git commit -m "v${NEXT_VERSION} [skip ci]"
|
git commit -m "v${NEXT_VERSION} [skip ci]"
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue