tests: respect the globally specified default branch when running tests
This commit is contained in:
1 file changed
+3
-2
+3
-2
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user