mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
fixes https://github.com/TryGhost/Toolbox/issues/532 - we should protect against failures entering `main` which could be avoided by running a quick unit test beforehand - this reintroduces Lerna as it supports parallelisation and `--since`, to run linting and unit tests on packages that have changed since upstream
10 lines
320 B
Bash
Executable file
10 lines
320 B
Bash
Executable file
#!/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
|