-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
23 lines (19 loc) · 1.05 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# process and open example
demo: (test 'true')
# process example, optionally opening browser
test OPEN='false':
rm -rf example/book
cargo build --release
cargo install --path .
cd example && RUST_LOG=info mdbook build {{ if OPEN == "true" { "--open ." } else { "" } }}
cargo uninstall mdbook-codeblocks
# bundle binary (CI)
bundle-tar TAG TARGET:
mv {{ join( "target", TARGET, "release", if TARGET == 'x86_64-pc-windows-gnu' { "mdbook-codeblocks.exe" } else { "mdbook-codeblocks" } ) }} {{ if TARGET == 'x86_64-pc-windows-gnu' { "mdbook-codeblocks.exe" } else { "mdbook-codeblocks" } }}
tar -czvf mdbook-codeblocks-{{TAG}}-{{TARGET}}.tar.gz \
{{ if TARGET == 'x86_64-pc-windows-gnu' { "mdbook-codeblocks.exe" } else { "mdbook-codeblocks" } }}
# bundle binary (CI)
bundle-7z TAG TARGET:
7z a "mdbook-codeblocks-{{TAG}}-{{TARGET}}.zip" "{{ join( `pwd`, "target", TARGET, "release", "mdbook-codeblocks.exe" ) }}"
bundle-zip TAG TARGET:
zip "mdbook-codeblocks-{{TAG}}-{{TARGET}}.zip" "{{ join( `pwd`, "target", TARGET, "release", "mdbook-codeblocks.exe" ) }}"