cross platform build
This commit is contained in:
parent
e15996f5aa
commit
20563f970f
@ -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
|
||||
|
||||
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/
|
||||
|
Loading…
Reference in New Issue
Block a user