diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7a585bd..3f89346 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build the release binary image run: make release - name: Print the git commit and the binary hash diff --git a/Dockerfile b/Dockerfile index efd6bd8..be56f0a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,3 +45,5 @@ COPY . . # Build RUN make build + +ENTRYPOINT [ "./release.sh" ] diff --git a/Makefile b/Makefile index e4ee906..7f17e8b 100644 --- a/Makefile +++ b/Makefile @@ -25,14 +25,17 @@ fe: release: docker build -t beacon . + mkdir -p $(shell pwd)/release-artifacts docker run --rm -v $(shell pwd)/release-artifacts:/target/wasm32-unknown-unknown/release beacon make hashes podman_release: podman build -t beacon . + mkdir -p $(shell pwd)/release-artifacts podman run --rm -v $(shell pwd)/release-artifacts:/target/wasm32-unknown-unknown/release beacon make hashes hashes: git rev-parse HEAD - shasum -a 256 ./release-artifacts/beacon.wasm.gz | cut -d ' ' -f 1 + ls -la $(shell pwd)/release-artifacts/ + shasum -a 256 $(shell pwd)/release-artifacts/beacon.wasm.gz | cut -d ' ' -f 1 diff --git a/build.sh b/build.sh index 431acab..3d35834 100755 --- a/build.sh +++ b/build.sh @@ -6,7 +6,6 @@ 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 - candid-extractor $WASM_FILE > "src/backend/$pkg.did" ic-wasm $WASM_FILE -o $WASM_FILE shrink gzip -nf9v $WASM_FILE done diff --git a/src/backend/beacon.did b/src/backend/beacon.did index 22a9e66..c574c73 100644 --- a/src/backend/beacon.did +++ b/src/backend/beacon.did @@ -25,13 +25,9 @@ service : () -> { http_request : (HttpRequest) -> (HttpResponse) query; list_token : (principal) -> (Result); orders : (principal, OrderType) -> (vec Order) query; - replace_canister_id : (principal, principal) -> (); - replace_user_id : (principal, principal) -> (); set_payment_token : (principal) -> (); set_revenue_account : (principal) -> (); stable_mem_read : (nat64) -> (vec record { nat64; blob }) query; - stable_mem_write : (vec record { nat64; blob }) -> (); - stable_to_heap : () -> (); trade : (principal, nat, nat, OrderType) -> (OrderExecution); withdraw : (principal) -> (Result_1); }