0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/.github/hooks/pre-push

11 lines
320 B
Text
Raw Normal View History

#!/bin/bash
[ -n "$CI" ] && exit 0
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$GIT_BRANCH" = "main" ]; then
printf " Pushing to \033[0;42m$GIT_BRANCH\033[0m branch requires some checks in advance\n"
yarn lerna run --include-dependents --since ${GHOST_UPSTREAM:-origin}/$GIT_BRANCH test:unit
fi