fix: CI - git fetch --unshallow antes del push de bump
This commit is contained in:
@@ -29,10 +29,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Bump versión patch + commit
|
- name: Fetch completo + Bump versión patch + commit
|
||||||
run: |
|
run: |
|
||||||
git config user.name "ShanaiaBot"
|
git config user.name "ShanaiaBot"
|
||||||
git config user.email "shanaia@freetimelab.es"
|
git config user.email "shanaia@freetimelab.es"
|
||||||
|
# Fetch completo para tener todo el historial y poder push
|
||||||
|
git fetch --unshallow origin main
|
||||||
CURRENT=$(grep '^version:' pubspec.yaml | awk '{print $2}')
|
CURRENT=$(grep '^version:' pubspec.yaml | awk '{print $2}')
|
||||||
SEMVER=$(echo $CURRENT | cut -d'+' -f1)
|
SEMVER=$(echo $CURRENT | cut -d'+' -f1)
|
||||||
BUILD=$(echo $CURRENT | cut -d'+' -f2)
|
BUILD=$(echo $CURRENT | cut -d'+' -f2)
|
||||||
@@ -46,7 +48,6 @@ jobs:
|
|||||||
git add pubspec.yaml
|
git add pubspec.yaml
|
||||||
git commit -m "chore: bump version to ${NEW_VERSION} [ci skip]"
|
git commit -m "chore: bump version to ${NEW_VERSION} [ci skip]"
|
||||||
git push origin main
|
git push origin main
|
||||||
echo "NEW_SEMVER=${MAJOR}.${MINOR}.${NEW_PATCH}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Extraer versión
|
- name: Extraer versión
|
||||||
id: version
|
id: version
|
||||||
|
|||||||
Reference in New Issue
Block a user