Add override capability to blacklist a remote

This commit is contained in:
Matt Keeler 2018-06-20 16:35:54 -04:00
parent a127f167ee
commit 9c836b0cb9
2 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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}"