diff --git a/build-support/functions/10-util.sh b/build-support/functions/10-util.sh index e997ccd2c4..2e89cbd155 100644 --- a/build-support/functions/10-util.sh +++ b/build-support/functions/10-util.sh @@ -441,6 +441,17 @@ function find_git_remote { return ${ret} } +function git_remote_not_blacklisted { + # Arguments: + # $1 - path to the repo + # $2 - the remote name + # + # Returns: + # 0 - not blacklisted + # * - blacklisted + return 0 +} + function is_git_clean { # Arguments: # $1 - Path to git repo diff --git a/build-support/functions/40-publish.sh b/build-support/functions/40-publish.sh index 3376ef168a..ffb8e64bf9 100644 --- a/build-support/functions/40-publish.sh +++ b/build-support/functions/40-publish.sh @@ -320,8 +320,11 @@ function publish_release { status_stage "==> Confirming Git Changes" confirm_git_push_changes "$1" || return 1 - status_stage "==> Confirming Git Remote" + status_stage "==> Checking for blacklisted Git Remote" local remote=$(find_git_remote "${sdir}") || return 1 + git_remote_not_blacklisted "${sdir}" "${remote}" || return 1 + + status_stage "==> Confirming Git Remote" confirm_git_remote "${sdir}" "${remote}" || return 1 if is_set "${pub_git}"