[gjs: 3/6] CI: Fix comments in shell script
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 3/6] CI: Fix comments in shell script
- Date: Tue, 9 Aug 2022 05:09:59 +0000 (UTC)
commit 969973a7d234d4c26ff4dd569830e49ceeab536f
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Jul 24 21:54:29 2022 -0700
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.
test/test-ci.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/test/test-ci.sh b/test/test-ci.sh
index dd61e17ec..58918b7c3 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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]