Skip to content

Commit

Permalink
Add VERSION file to wasm-internal (#92)
Browse files Browse the repository at this point in the history
Adds a `VERSION` file to wasm artifacts with the full git hash to the
commit used to build the artifact.

Resolves #12
  • Loading branch information
Hinton authored Dec 20, 2024
1 parent 2fbc5ba commit 42e7f45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions crates/bitwarden-wasm-internal/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ cd "$(dirname "$0")"
# Move to the root of the repository
cd ../../

# Write VERSION file
git rev-parse HEAD > ./crates/bitwarden-wasm-internal/npm/VERSION

if [ "$1" != "-r" ]; then
# Dev
cargo build -p bitwarden-wasm-internal --target wasm32-unknown-unknown
Expand Down
1 change: 1 addition & 0 deletions crates/bitwarden-wasm-internal/npm/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ bitwarden_wasm_internal_bg.wasm.d.ts
bitwarden_wasm_internal_bg.wasm.js
bitwarden_wasm_internal.d.ts
bitwarden_wasm_internal.js
VERSION
7 changes: 4 additions & 3 deletions crates/bitwarden-wasm-internal/npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
"license": "GPL-3.0",
"files": [
"bitwarden_wasm_internal_bg.js",
"bitwarden_wasm_internal_bg.wasm",
"bitwarden_wasm_internal_bg.wasm.d.ts",
"bitwarden_wasm_internal_bg.wasm.js",
"bitwarden_wasm_internal_bg.wasm",
"bitwarden_wasm_internal.d.ts",
"bitwarden_wasm_internal.js",
"index.js",
"node/bitwarden_wasm_internal_bg.wasm",
"node/bitwarden_wasm_internal_bg.wasm.d.ts",
"node/bitwarden_wasm_internal_bg.wasm",
"node/bitwarden_wasm_internal.d.ts",
"node/bitwarden_wasm_internal.js"
"node/bitwarden_wasm_internal.js",
"VERSION"
],
"main": "node/bitwarden_wasm_internal.js",
"module": "index.js",
Expand Down

0 comments on commit 42e7f45

Please sign in to comment.