diff --git a/wasm32/Dockerfile b/wasm32/Dockerfile index f10be7b..83c4fef 100644 --- a/wasm32/Dockerfile +++ b/wasm32/Dockerfile @@ -9,3 +9,5 @@ ENTRYPOINT ["trunk"] CMD ["serve"] WORKDIR /egui-circles + +EXPOSE 8080/tcp \ No newline at end of file diff --git a/wasm32/build.sh b/wasm32/build.sh index 6f2e07b..bbf5302 100755 --- a/wasm32/build.sh +++ b/wasm32/build.sh @@ -25,16 +25,36 @@ if ! has_docker_image $BUILDER; then esac fi -echo "Initiate WASM32 target build.." +echo "--> Initiate WASM32 target build.." -if has_docker_container $TRAGET; then - docker start \ - $TRAGET \ - --attach -else - docker run \ - --volume $(pwd):/$NAME \ - --name $TRAGET \ - $BUILDER \ - build --release --public-url /$NAME --verbose -fi +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)? " +case "$REPLY" in +y|Y ) + cd dist/ + + git init + git checkout -b main + git add . + git commit --message «v0.2.1» + + # solution for "send-pack: unexpected disconnect while reading sideband packet" + git config http.postBuffer 157286400 + + git remote add origin https://gitea.djmil.dev/demo/egui-circles.git + git push --set-upstream origin main --force + + echo "--> Published at https://demo.pages.djmil.dev/egui-circles" + ;; +* ) + exit 0 + ;; +esac