Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
warycat committed Jan 20, 2021
1 parent 759f18d commit cd9dd5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
15 changes: 4 additions & 11 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,23 @@ script = 'cargo build --release --verbose'
script = 'cp target/release/rustgym-server rustgym-server'

[tasks.wasm-pack]
script = 'wasm-pack build wasm --target web'

[tasks.clean-pkg]
script = "rm -rf pkg/"

[tasks.copy-wasm]
script = 'cp -R wasm/pkg/ pkg/'
script = 'wasm-pack build wasm --target web --out-dir ../pkg'

[tasks.archive-wasm]
script = "tar -czvf pkg.tar.gz pkg"
dependencies = ["copy-wasm"]

[tasks.watch-wasm]
run_task = { name = ["wasm-pack", "clean-pkg", "copy-wasm"] }
run_task = { name = ["wasm-pack"] }
watch = { postpone = true, watch = ["./wasm/", "./message/"] }

[tasks.deploy]
script = [
"echo $TAG",
"git tag $TAG",
"git push origin $TAG",
"gh release create $TAG rustgym.sqlite rustgym-server"
"gh release create $TAG rustgym.sqlite rustgym-server pkg.tar.gz"
]
dependencies = ["readme", "mac", "copy-server", "wasm-pack", "copy-wasm"]
dependencies = ["readme", "mac", "copy-server", "wasm-pack", "archive-wasm"]

[tasks.watch-server]
script = "cargo watch -w server -w message -x 'run --bin rustgym-server'"
Expand Down
2 changes: 1 addition & 1 deletion characters/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ mod tests {
use super::CHARACTERS;
#[test]
fn characters() {
assert_eq!(CHARACTERS.len(), 17);
assert_eq!(CHARACTERS.len(), 20);
}
}

0 comments on commit cd9dd5c

Please sign in to comment.