build: reformat justfile
This commit is contained in:
parent
96f8c884b7
commit
65fb134330
24
justfile
24
justfile
@ -6,32 +6,22 @@ profile := 'dev'
|
|||||||
host-target := `rustc -vV | lines | skip 1 | to text | from csv -s : --noheaders | reduce -f {} {|el, acc| $acc | upsert $el.column0 $el.column1 } | get host | str trim`
|
host-target := `rustc -vV | lines | skip 1 | to text | from csv -s : --noheaders | reduce -f {} {|el, acc| $acc | upsert $el.column0 $el.column1 } | get host | str trim`
|
||||||
artifact-dir := 'addons/boids/lib'
|
artifact-dir := 'addons/boids/lib'
|
||||||
|
|
||||||
[private]
|
_default: (_just-cmd '-l')
|
||||||
default: (just-cmd '-l')
|
_setup-env:
|
||||||
|
|
||||||
[private]
|
|
||||||
setup-env:
|
|
||||||
mkdir -v {{artifact-dir}}
|
mkdir -v {{artifact-dir}}
|
||||||
|
_just-cmd *FLAGS="":
|
||||||
[private]
|
|
||||||
just-cmd *FLAGS="":
|
|
||||||
@just -f {{justfile()}} {{FLAGS}}
|
@just -f {{justfile()}} {{FLAGS}}
|
||||||
|
|
||||||
|
build $target=(host-target) *FLAGS="": _setup-env
|
||||||
build $target=(host-target) *FLAGS="": setup-env
|
|
||||||
cd rust; cross build {{FLAGS}} --profile {{profile}} --target {{target}}
|
cd rust; cross build {{FLAGS}} --profile {{profile}} --target {{target}}
|
||||||
|
install $target=(host-target): _setup-env
|
||||||
install $target=(host-target): setup-env
|
|
||||||
mv -f rust/target/{{target}}/{{`$env.profiledir`}}/{{`$env.libprefix`}}boids.{{`$env.ext`}} {{artifact-dir}}/boids.{{`$env.arch`}}.{{`$env.ext`}}
|
mv -f rust/target/{{target}}/{{`$env.profiledir`}}/{{`$env.libprefix`}}boids.{{`$env.ext`}} {{artifact-dir}}/boids.{{`$env.arch`}}.{{`$env.ext`}}
|
||||||
|
build-install target=(host-target) *FLAGS="": (build target FLAGS) (install target)
|
||||||
build-install target *FLAGS="": (build target FLAGS) (install target)
|
|
||||||
|
|
||||||
wasm: (build-install 'wasm32-unknown-emscripten' '+nightly' '-Zbuild-std')
|
wasm: (build-install 'wasm32-unknown-emscripten' '+nightly' '-Zbuild-std')
|
||||||
windows: (build-install 'x86_64-pc-windows-msvc')
|
windows: (build-install 'x86_64-pc-windows-msvc')
|
||||||
linux: (build-install 'x86_64-unknown-linux-gnu')
|
linux: (build-install 'x86_64-unknown-linux-gnu')
|
||||||
|
all: (_just-cmd '--timestamp' 'profile=release' 'linux' 'windows' 'wasm')
|
||||||
all: (just-cmd '--timestamp' 'profile=release' 'linux' 'windows' 'wasm')
|
|
||||||
|
|
||||||
|
|
||||||
package:
|
package:
|
||||||
run-external 'zip' '-r' 'boids-release.zip' 'addons' 'examples' 'README.md' 'LICENSE.txt'
|
run-external 'zip' '-r' 'boids-release.zip' 'addons' 'examples' 'README.md' 'LICENSE.txt'
|
Loading…
Reference in New Issue
Block a user