tests: respect the globally specified default branch when running tests

This commit is contained in:
Jose Diaz-Gonzalez committed 2025-11-16 01:11:09 -05:00
1 parent 9411c4ddc1
commit 531bb20519
1 file changed
+3 -2
+3 -2
View File
@@ -45,10 +45,11 @@ git add .
[[ -x pre-commit ]] && ./pre-commit "$REMOTE" "$REPO" [[ -x pre-commit ]] && ./pre-commit "$REMOTE" "$REPO"
git commit -m 'initial commit' git commit -m 'initial commit'
current_branch="$(git rev-parse --abbrev-ref HEAD)"
if [[ "$SHOULD_FAIL" == true ]]; then if [[ "$SHOULD_FAIL" == true ]]; then
git push target "master:$BRANCH" && succeeded git-push git push target "$current_branch:$BRANCH" && succeeded git-push
else else
git push target "master:$BRANCH" || failed git-push git push target "$current_branch:$BRANCH" || failed git-push
fi fi
if [[ -x post-deploy ]]; then if [[ -x post-deploy ]]; then
./post-deploy "$REMOTE" "$REPO" || failed post-deploy ./post-deploy "$REMOTE" "$REPO" || failed post-deploy