Skip to content

Commit

Permalink
fix trunk builds for trunk 0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
barsoosayque committed Nov 23, 2024
1 parent 49f010b commit 3fdcf40
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
- name: Rust Cache # cache the rust build artefacts
uses: Swatinem/rust-cache@v2
- name: Download and install Trunk binary
run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.20.1/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
run: wget -qO- https://github.com/trunk-rs/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
- name: Build # build
# Environment $public_url resolves to the github project page.
# If using a user/organization page, remove the `${{ github.event.repository.name }}` part.
# using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico .
# this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested
# relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
# will obviously return error 404 not found.
run: ./trunk build --release --public-url $public_url crates/opensi-editor/index.html
run: ./trunk build --release --public-url $public_url --config crates/opensi-editor/Trunk.toml
env:
public_url: "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
- name: Deploy
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ authors = ["barsoosayque <[email protected]>", "snpefk <[email protected]>"]
edition = "2021"
license = "MIT"
version = "0.1.0"
rust-version = "1.76"

[profile.release]
opt-level = 2 # fast and small wasm
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ OpenSI Editor совместим с пакетами формата `*.siq` из
$ cargo run opensi-editor

# Запуск веб-версии (потребуется установка trunk)
$ trunk serve crates/opensi-editor/index.html
$ trunk serve --config crates/opensi-editor/Cargo.toml
```
1 change: 1 addition & 0 deletions crates/opensi-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
version.workspace = true
rust-version.workspace = true

[dependencies]
serde = { version = "1.0", features = [ "derive" ] }
Expand Down
1 change: 1 addition & 0 deletions crates/opensi-editor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
version.workspace = true
rust-version.workspace = true

[dependencies]
opensi-core = { version = "*", path = "../opensi-core" }
Expand Down

0 comments on commit 3fdcf40

Please sign in to comment.