File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,8 @@ balena_docker_create_compose_file() {
271
271
fi
272
272
if [ -n " ${_local_image} " ]; then
273
273
_image_id=$( balena_docker_image_retrieve " ${_local_image} " )
274
- _block_image=" ${_image_id} "
274
+ docker tag " ${_image_id} " " ${_block} :${_version} "
275
+ _block_image=" ${_block} :${_version} "
275
276
else
276
277
_block_image=$( balena_api_fetch_image_from_app " ${_block} " " ${_version} " " ${_apiEnv} " )
277
278
if [ -z " ${_block_image} " ] || [ " ${_block_image} " = " " ]; then
Original file line number Diff line number Diff line change @@ -465,13 +465,14 @@ balena_lib_release() {
465
465
local _releaseID=" "
466
466
local _status=" "
467
467
local _debug=" "
468
+ local _version
468
469
469
470
[ -z " ${_appName} " ] && >&2 echo " balena_lib_release: Application name is required" && exit 1
470
471
_apiEnv=${_apiEnv:- " $( balena_lib_environment) " }
471
472
_path=${_path:- " $( pwd) " }
473
+ _version=$( balena_lib_get_os_version)
472
474
if [ -f " ${_path} /balena.yml" ]; then
473
475
_contract_version=$( awk ' /version:/ {print $2}' " ${_path} /balena.yml" )
474
- _version=$( balena_lib_get_os_version)
475
476
if [ " ${_contract_version} " != " ${_version} " ]; then
476
477
>&2 echo " balena_lib_release: Version mismatch, contract ${_contract_version} os ${_version} "
477
478
return 1
@@ -489,7 +490,7 @@ balena_lib_release() {
489
490
if [ -n " ${_image_id} " ]; then
490
491
_releaseID=$( BALENARC_BALENA_URL=" ${_apiEnv} " balena deploy " ${_appName} " " ${_image_id} " --source " ${_path} " ${_status} ${_debug} | sed -n ' s/.*Release: //p' )
491
492
else
492
- _releaseID=$( BALENARC_BALENA_URL=" ${_apiEnv} " balena deploy " ${_appName} " --build --source " ${_path} " ${_status} ${_debug} | sed -n ' s/.*Release: //p' )
493
+ _releaseID=$( BALENARC_BALENA_URL=" ${_apiEnv} " balena deploy " ${_appName} " --build --source " ${_path} " --cache-from ${_appName #*/ } : ${_version} ${_status} ${_debug} | sed -n ' s/.*Release: //p' )
493
494
fi
494
495
[ -n " ${_releaseID} " ] && >&2 echo " Deployed ${_image_id} to ${_appName} as ${_status## --} at ${_releaseID} "
495
496
echo " ${_releaseID} "
You can’t perform that action at this time.
0 commit comments