Skip to content

Commit

Permalink
Tune down debug printing in some util funcs
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Kolesnik <[email protected]>
  • Loading branch information
mkolesnik authored and tpantelis committed Sep 12, 2022
1 parent 5e5a409 commit dcc2f08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/lib/utils
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ ORG=${ORG:-${GITHUB_REPOSITORY_OWNER:-$(git config --get remote.origin.url | awk
declare -A NEXT_STATUS=( [branch]=shipyard [shipyard]=admiral [admiral]=projects [projects]=installers [installers]=released )

function printerr() {
local DEBUG_PRINT=false
local err_msg="$*"

[[ -z "${file}" ]] || err_msg+=" (${file})"
printf "ERROR: %s\n" "${err_msg}" >&2
}

function count_parents() {
local DEBUG_PRINT=false
git cat-file -p "$1" | grep -c "^parent "
}

Expand All @@ -45,6 +47,7 @@ function determine_target_release() {
}

function read_release_file() {
local DEBUG_PRINT=false
declare -gA release

function _read() {
Expand Down Expand Up @@ -105,6 +108,7 @@ function checkout_project_branch() {
}

function is_semver() {
local DEBUG_PRINT=false
local ver="(0|[1-9][0-9]*)"
local regex="^${ver}\.${ver}\.${ver}(-([0-9a-zA-Z.-]*))?$"
if [[ ! "$1" =~ ${regex} ]]; then
Expand All @@ -114,6 +118,7 @@ function is_semver() {
}

function extract_semver() {
local DEBUG_PRINT=false
declare -gA semver
IFS=".-" read -r semver['major'] semver['minor'] semver['patch'] semver['pre'] <<< "$1"
}
Expand Down

0 comments on commit dcc2f08

Please sign in to comment.