File tree 2 files changed +9
-4
lines changed 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 12
12
arg.in
13
13
Dockerfile
14
14
* .wasm
15
+ * .swp
15
16
16
17
# filter out all "hidden" files and directories
17
18
# (.git, .dfx, .*ignore, etc)
Original file line number Diff line number Diff line change @@ -47,14 +47,16 @@ RUN cargo install ic-cdk-optimizer --version 0.3.1
47
47
48
48
# Pre-build all cargo dependencies. Because cargo doesn't have a build option
49
49
# to build only the dependecies, we pretend that our project is a simple, empty
50
- # `lib.rs`. Then we remove the dummy source files to make sure cargo rebuild
51
- # everything once the actual source code is COPYed (and e.g. doesn't trip on
52
- # timestamps being older)
50
+ # `lib.rs`. When we COPY the actual files we make sure to `touch` lib.rs so
51
+ # that cargo knows to rebuild it with the new content.
53
52
COPY Cargo.lock .
54
53
COPY Cargo.toml .
55
54
COPY src/cubehash src/cubehash
56
55
COPY src/internet_identity/Cargo.toml src/internet_identity/Cargo.toml
57
- RUN mkdir -p src/internet_identity/src && touch src/internet_identity/src/lib.rs && cargo build --target wasm32-unknown-unknown --release -j1 && rm -rf src
56
+ RUN mkdir -p src/internet_identity/src \
57
+ && touch src/internet_identity/src/lib.rs \
58
+ && cargo build --target wasm32-unknown-unknown --release -j1 \
59
+ && rm -rf src
58
60
59
61
FROM deps as build
60
62
@@ -65,6 +67,8 @@ ARG II_ENV=production
65
67
66
68
RUN npm ci
67
69
RUN npm run build
70
+
71
+ RUN touch src/internet_identity/src/lib.rs
68
72
RUN cargo build --target wasm32-unknown-unknown --release -j1
69
73
RUN sha256sum dist/*
70
74
RUN sha256sum /cargo_target/wasm32-unknown-unknown/release/internet_identity.wasm
You can’t perform that action at this time.
0 commit comments