Fixing building process
This commit is contained in:
parent
236a9c4bc5
commit
104b483c3d
1 changed files with 11 additions and 10 deletions
19
build.sh
19
build.sh
|
@ -83,7 +83,7 @@ to-docker-args() {
|
|||
out=""
|
||||
while read -r line; do
|
||||
key="${line%=*}"
|
||||
value="$(echo "${line#=*}" | pass-argument REPO "$1" | pass-argument VERSION "$2")"
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue