Skip to content

Commit c51b604

Browse files
committed
SQ balena-lib balena_lib_release add DEBUG
1 parent 7796ef2 commit c51b604

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

automation/include/balena-lib.inc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ balena_lib_release() {
442442
local _image_id="${5}"
443443
local _releaseID=""
444444
local _status=""
445+
local _debug=""
445446

446447
[ -z "${_appName}" ] && >&2 echo "balena_lib_release: Application name is required" && exit 1
447448
_apiEnv=${_apiEnv:-"$(balena_lib_environment)"}
@@ -457,12 +458,13 @@ balena_lib_release() {
457458
if [ "${_final}" = "no" ]; then
458459
_status="--draft"
459460
fi
461+
[ "${VERBOSE}" = "verbose" ] && _debug="--debug"
460462

461463
balena_lib_login "${_apiEnv}"
462464
if [ -n "${_image_id}" ]; then
463-
_releaseID=$(BALENARC_BALENA_URL="${_apiEnv}" balena deploy "${_appName}" "${_image_id}" --source "${_path}" ${_status} | sed -n 's/.*Release: //p')
465+
_releaseID=$(BALENARC_BALENA_URL="${_apiEnv}" balena deploy "${_appName}" "${_image_id}" --source "${_path}" ${_status} ${_debug} | sed -n 's/.*Release: //p')
464466
else
465-
_releaseID=$(BALENARC_BALENA_URL="${_apiEnv}" balena deploy "${_appName}" --build --source "${_path}" ${_status} | sed -n 's/.*Release: //p')
467+
_releaseID=$(BALENARC_BALENA_URL="${_apiEnv}" balena deploy "${_appName}" --build --source "${_path}" ${_status} ${_debug} | sed -n 's/.*Release: //p')
466468
fi
467469
[ -n "${_releaseID}" ] && >&2 echo "Deployed ${_image_id} to ${_appName} as ${_status##--} at ${_releaseID}"
468470
echo "${_releaseID}"

0 commit comments

Comments
 (0)