chore: git pull --rebase avant le build dans le hook pre-push
CI — Tests & Docker Build / Tests (push) Failing after 1m53s
CI — Tests & Docker Build / Build & push image Docker (push) Has been skipped

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 10:44:47 +02:00
parent 321b664398
commit d64abcd9c5
+9 -2
View File
@@ -1,9 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
echo "🐳 Pre-push : build de l'image Docker de production..."
REPO_ROOT=$(git rev-parse --show-toplevel) REPO_ROOT=$(git rev-parse --show-toplevel)
BRANCH=$(git symbolic-ref --short HEAD)
echo "🔄 Pre-push : synchronisation avec origin/$BRANCH..."
if ! git pull --rebase origin "$BRANCH"; then
echo "❌ git pull --rebase a échoué — résous les conflits avant de pousser"
exit 1
fi
echo "🐳 Pre-push : build de l'image Docker de production..."
VERSION=$(grep '^version' "$REPO_ROOT/build.gradle" | awk -F"'" '{print $2}') VERSION=$(grep '^version' "$REPO_ROOT/build.gradle" | awk -F"'" '{print $2}')
IMAGE="git.goutailler-olivier.com/gato/olhar-api:$VERSION" IMAGE="git.goutailler-olivier.com/gato/olhar-api:$VERSION"