File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed
Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,13 @@ endif
2626
2727# Git options.
2828GIT_OPTS? =
29- # Set this to the remote used for the upstream repo (for release). Use an
30- # absolute reference since we don't know if origin is the contributor's fork or
31- # if it's the upstream repository.
32- GIT_REMOTE? =git@github.com:openshift/file-integrity-operator.git
29+ # Set this to the remote used for the upstream repo (for release). Different
30+ # maintainers might use different names for the upstream repository. Since our
31+ # release process expects maintainers to propose release patches directly to
32+ # the upstream repository, let's make sure we're proposing it to the right one.
33+ # We rely on a bash script for this since it's simplier than interating over a
34+ # list with conditionals in GNU make.
35+ GIT_REMOTE? =$(shell ./utils/git-remote.sh)
3336
3437# Image tag to use. Set this if you want to use a specific tag for building
3538# or your e2e tests.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # git-remote.sh prints the remote associated with the upstream
4+ # openshift/file-integrity-operator repository. If it can't determine the
5+ # appropriate remote based on a known URL, it defaults to using "origin", which
6+ # is backwards compatible with the release process.
7+
8+ REMOTE_URL=origin
9+ for REMOTE in ` git remote` ; do
10+ URL=` git config --get remote.$REMOTE .url`
11+ if [[ " $URL " = " https://github.com/openshift/file-integrity-operator" ]]; then
12+ REMOTE_URL=$REMOTE
13+ break
14+ fi
15+ done
16+ echo $REMOTE_URL
You can’t perform that action at this time.
0 commit comments