This works by checking the $CIRCLE_BRANCH env-var, which is set automatically by CircleCI. Annoyingly, this is set to the name of the source branch for a merge, rather than the target branch. The behavior of this check for each branch type is listed: if CIRCLE_BRANCH == "master": This CI run is the nightly CI run for the master branch. Make sure all submodules of the master branch point to master else if CIRCLE_BRANCH == "dev": This CI run is most likely somebody doing a dev->master merge. Make sure all submodules of the dev branch point to master else: This CI run is likely somebody merging a feature branch into dev. Allow submodule pointers of the dev branch to point to master OR dev
2.9 KiB
Executable File
2.9 KiB
Executable File