diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2022-07-24 21:54:29 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2022-08-07 21:36:29 -0700 |
commit | 969973a7d234d4c26ff4dd569830e49ceeab536f (patch) | |
tree | 04fa24ca34ff90dfa524c84e1ffc69d2b3a20e4d | |
parent | 330ae5d67867ea9fff97f733f9219921ae22bf19 (diff) | |
download | gjs-969973a7d234d4c26ff4dd569830e49ceeab536f.tar.gz |
CI: Fix comments in shell script
This comment didn't make sense where it was placed, put it next to the
code that it refers to.
-rwxr-xr-x | test/test-ci.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/test-ci.sh b/test/test-ci.sh index dd61e17e..58918b7c 100755 --- a/test/test-ci.sh +++ b/test/test-ci.sh @@ -39,6 +39,8 @@ do_Get_Upstream_Base () { # should probably be rebased. git remote add upstream https://gitlab.gnome.org/GNOME/gjs.git || \ git remote set-url upstream https://gitlab.gnome.org/GNOME/gjs.git + # $CI_MERGE_REQUEST_TARGET_BRANCH_NAME is only defined if we’re running in a + # merge request pipeline; fall back to $CI_DEFAULT_BRANCH otherwise. base_branch="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}" if ! git fetch --shallow-since="28 days ago" --no-tags upstream "$base_branch"; then echo "Main branch doesn't have history in the past 28 days, fetching " @@ -51,9 +53,6 @@ do_Get_Upstream_Base () { # Work out the newest common ancestor between the detached HEAD that this CI # job has checked out, and the upstream target branch (which will typically # be `upstream/master` or `upstream/gnome-nn`). - # - # $CI_MERGE_REQUEST_TARGET_BRANCH_NAME is only defined if we’re running in a - # merge request pipeline; fall back to $CI_DEFAULT_BRANCH otherwise. newest_common_ancestor_sha=$(git merge-base ci-upstream-base-branch HEAD) if test -z "$newest_common_ancestor_sha"; then echo "Couldn’t find common ancestor with the upstream main branch. This" |