Skip to content

Commit

Permalink
SQ
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgg committed Jun 16, 2022
1 parent 6874547 commit b0da193
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion automation/include/balena-docker.inc
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ balena_docker_create_compose_file() {
fi
if [ -n "${_local_image}" ]; then
_image_id=$(balena_docker_image_retrieve "${_local_image}")
_block_image="${_image_id}"
docker tag "${_image_id}" "${_block}:${_version}"
_block_image="${_block}:${_version}"
else
_block_image=$(balena_api_fetch_image_from_app "${_block}" "${_version}" "${_apiEnv}")
if [ -z "${_block_image}" ] || [ "${_block_image}" = "" ]; then
Expand Down
5 changes: 3 additions & 2 deletions automation/include/balena-lib.inc
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,14 @@ balena_lib_release() {
local _releaseID=""
local _status=""
local _debug=""
local _version

[ -z "${_appName}" ] && >&2 echo "balena_lib_release: Application name is required" && exit 1
_apiEnv=${_apiEnv:-"$(balena_lib_environment)"}
_path=${_path:-"$(pwd)"}
_version=$(balena_lib_get_os_version)
if [ -f "${_path}/balena.yml" ]; then
_contract_version=$(awk '/version:/ {print $2}' "${_path}/balena.yml")
_version=$(balena_lib_get_os_version)
if [ "${_contract_version}" != "${_version}" ]; then
>&2 echo "balena_lib_release: Version mismatch, contract ${_contract_version} os ${_version}"
return 1
Expand All @@ -489,7 +490,7 @@ balena_lib_release() {
if [ -n "${_image_id}" ]; then
_releaseID=$(BALENARC_BALENA_URL="${_apiEnv}" balena deploy "${_appName}" "${_image_id}" --source "${_path}" ${_status} ${_debug} | sed -n 's/.*Release: //p')
else
_releaseID=$(BALENARC_BALENA_URL="${_apiEnv}" balena deploy "${_appName}" --build --source "${_path}" ${_status} ${_debug} | sed -n 's/.*Release: //p')
_releaseID=$(BALENARC_BALENA_URL="${_apiEnv}" balena deploy "${_appName}" --build --source "${_path}" --cache-from ${_appName#*/}:${_version} ${_status} ${_debug} | sed -n 's/.*Release: //p')
fi
[ -n "${_releaseID}" ] && >&2 echo "Deployed ${_image_id} to ${_appName} as ${_status##--} at ${_releaseID}"
echo "${_releaseID}"
Expand Down

0 comments on commit b0da193

Please sign in to comment.