From 20563f970f8c18c5d25e904db604afc3245733f5 Mon Sep 17 00:00:00 2001 From: djmil Date: Sat, 31 Aug 2024 12:02:43 +0200 Subject: [PATCH] cross platform build --- wasm32/build.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/wasm32/build.sh b/wasm32/build.sh index bbf5302..19c0743 100755 --- a/wasm32/build.sh +++ b/wasm32/build.sh @@ -2,8 +2,7 @@ set -euo pipefail NAME=egui-circles -BUILDER=djmil/$NAME-builder:0.0.1 -TRAGET=$NAME-wasm32 +BUILDER=$NAME-builder:wasm32 has_docker_image() { docker manifest inspect $1 @@ -16,10 +15,14 @@ has_docker_container() { if ! has_docker_image $BUILDER; then echo "Docker $BUILDER was not found" - read -p "Would you like to create builder image (y/n)? " + read -p "Would you like to create builder image (y/N)? " case "$REPLY" in y|Y ) - docker build --tag $BUILDER . ;; + docker build \ + --file wasm32/Dockerfile \ + --tag $BUILDER \ + . + ;; * ) exit 1 ;; esac @@ -30,13 +33,12 @@ echo "--> Initiate WASM32 target build.." docker run \ --rm \ --volume $(pwd):/$NAME \ - --name $TRAGET \ $BUILDER \ - build --release --public-url /$NAME --verbose + build --release --public-url /$NAME --verbose echo "--> wasm32 target can be found in dist/ folder" -read -p "Would you like to publish (y/n)? " +read -p "Would you like to publish (y/N)? " case "$REPLY" in y|Y ) cd dist/