Skip to content

Commit

Permalink
Merge pull request #270 from zhang-accounting/264-release-wasm-bindin…
Browse files Browse the repository at this point in the history
…g-when-releasing-a-new-version

chore: fix wasm version update script
  • Loading branch information
Kilerd authored Mar 26, 2024
2 parents ec05984 + 144c0ba commit bec97d0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: update wasm version
run: sed -i 's/version = "0.1.1"/version = "${{github.ref_name}}"/' Cargo.toml
run: |
chmod +x ./update-cargo-version.sh
./update-cargo-version.sh "${{github.ref_name}}"
working-directory: ./bindings/wasm

- uses: jetli/[email protected]
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions bindings/wasm/update-cargo-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "Releasing version: $1";
trimmed_version=$(echo $1 | tail -c+2);
echo "Trimmed version: $trimmed_version";
echo "Update command: s/version = \"0.1.1\"/version = \"$trimmed_version\"/"
sed -i "s/version = \"0.1.1\"/version = \"$trimmed_version\"/" Cargo.toml
2 changes: 1 addition & 1 deletion zhang-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde = { version = "1", features = ["derive"] }
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["v4", "serde"] }
unicode_categories = "0.1"
sha256 = { version = "1.5.0", features = [] }
sha256 = { version = "1.5.0", features = [], default-features = false }
serde_json = "1"
strum = { version = "0.26", features = ["derive"] }
chrono-tz = "0.8"
Expand Down

0 comments on commit bec97d0

Please sign in to comment.