Some fixes to .pfnci/script.sh
Update v6 to v7
Output error message in get_base_branch()
Remove 'run' in get_base_branch() as it should not be skipped
@@ -138,7 +138,7 @@ prepare_docker() {
# base development branch.
is_known_base_branch() {
local branch="${1##refs/heads/}"
- for BASE_BRANCH in master v6; do
+ for BASE_BRANCH in master v7; do
if [ "${branch}" = "${BASE_BRANCH}" ]; then
return 0
fi
@@ -148,9 +148,10 @@ is_known_base_branch() {
# get_base_branch returns the base development branch for the current HEAD.
get_base_branch() {
- for BASE_BRANCH in master v6; do
- run git merge-base --is-ancestor "origin/${BASE_BRANCH}" HEAD && echo "${BASE_BRANCH}" && return 0
+ for BASE_BRANCH in master v7; do
+ git merge-base --is-ancestor "origin/${BASE_BRANCH}" HEAD && echo "${BASE_BRANCH}" && return 0
done
+ echo "Base branch of HEAD is not valid." >&2
return 1
}
