From 104b483c3d7aee60519b2d260997df720bea5d84 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Tue, 24 Sep 2024 17:35:51 +0200 Subject: [PATCH] Fixing building process --- build.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/build.sh b/build.sh index 493a59b..6be01dc 100644 --- a/build.sh +++ b/build.sh @@ -83,8 +83,8 @@ to-docker-args() { out="" while read -r line; do key="${line%=*}" - value="$(echo "${line#=*}" | pass-argument REPO "$1" | pass-argument VERSION "$2")" - out="$out--build-arg $key=$value"; + value="$(echo "${line}" | get-value-of "$key" | pass-argument REPO "$1" | pass-argument VERSION "$2")" + out="$out--build-arg $key=$value "; done echo "$out" } @@ -102,21 +102,22 @@ build_pyside() { tag="$(from-toml-dict "$cfg" "$build.settings" | get-value-of TAG | pass-argument VERSION "$version")" latest_tag="$(from-toml-dict "$cfg" "$build.settings" | get-value-of TAG | pass-argument VERSION "${major}-latest")" build_args="$(from-toml-dict "$cfg" "$build.docker-args" | to-docker-args "$repo" "$version")" - box-green "Building image $tag..." - docker build -t "$tag" $build_args "$directory/${build}" + box-green "Building image $repo:$tag..." + echo "> docker build -t $repo:$tag $build_args $directory/${build}" + docker build -t "$repo:$tag" $build_args "$directory/${build}" # Tag as latest if [ "$latest" != "false" ]; then - docker tag "$tag" "$latest_tag" + docker tag "$repo:$tag" "$repo:$latest_tag" fi # Push builds if [ "$push" != "false" ]; then if [ "$latest" != "false" ]; then - box-green "Pushing image $repo/$tag and $repo/$latest_tag..." - docker push "$latest_tag" - docker push "$tag" + box-green "Pushing image $repo:$tag and $repo:$latest_tag..." + docker push "$repo:$latest_tag" + docker push "$repo:$tag" else - box-green "Pushing image $repo/$tag..." - docker push "$tag" + box-green "Pushing image $repo:$tag..." + docker push "$repo:$tag" fi fi done