From 1836980a98073b1a91ca0c49ca85cc3c44f6ba35 Mon Sep 17 00:00:00 2001 From: X Date: Tue, 27 Aug 2024 08:11:01 +0200 Subject: [PATCH] fix: simplify build --- Dockerfile | 3 --- Makefile | 2 +- build.sh | 11 ----------- dfx.json | 4 +--- release.sh | 4 ++++ 5 files changed, 6 insertions(+), 18 deletions(-) delete mode 100755 build.sh diff --git a/Dockerfile b/Dockerfile index be56f0a..98f8a2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,4 @@ RUN npm ci COPY . . -# Build -RUN make build - ENTRYPOINT [ "./release.sh" ] diff --git a/Makefile b/Makefile index 6d59a72..1885e83 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ local_reinstall: build: NODE_ENV=production make fe - ./build.sh beacon + dfx build test: cargo clippy --tests --benches -- -D clippy::all diff --git a/build.sh b/build.sh deleted file mode 100755 index 3d35834..0000000 --- a/build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -FEATURES="${FEATURES:-}" -echo "Features: $FEATURES" - -for pkg in $1; do - cargo build -q --target wasm32-unknown-unknown --release --package $pkg --features "$FEATURES" --locked - WASM_FILE=target/wasm32-unknown-unknown/release/$pkg.wasm - ic-wasm $WASM_FILE -o $WASM_FILE shrink - gzip -nf9v $WASM_FILE -done diff --git a/dfx.json b/dfx.json index 41c6129..ec68c20 100644 --- a/dfx.json +++ b/dfx.json @@ -3,9 +3,7 @@ "beacon": { "candid": "src/backend/beacon.did", "package": "beacon", - "type": "custom", - "wasm": "target/wasm32-unknown-unknown/release/beacon.wasm.gz", - "build": "./build.sh beacon", + "type": "rust", "metadata": [ { "name": "candid:service", diff --git a/release.sh b/release.sh index 911f8f0..d35fee5 100755 --- a/release.sh +++ b/release.sh @@ -1,3 +1,7 @@ #!/bin/sh +export PATH=${HOME}/.local/share/dfx/bin:${PATH} + +make start +dfx canister create beacon make build