-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
33 lines (27 loc) · 928 Bytes
/
Justfile
File metadata and controls
33 lines (27 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import? "git.just"
# Delegate all invocations to the full recipe set
[no-cd]
@cross *ARGS:
REPO_DIR=$(git rev-parse --show-toplevel) \
USER_CWD=${USER_CWD:-$(pwd)} \
just --justfile "{{source_dir()}}/Justfile.cross" {{ARGS}}
# keep compatibility with `just test-cross`
[no-cd]
@cross-test *ARGS:
REPO_DIR=$(git rev-parse --show-toplevel) \
just --justfile "{{source_dir()}}/Justfile.cross" test "{{ARGS}}"
# Run the Rust implementation
[no-cd]
@cross-rust *ARGS:
cargo run --manifest-path "{{source_dir()}}/src-rust/Cargo.toml" -- {{ARGS}}
# Run the Go implementation
[no-cd]
@cross-go *ARGS:
go run -C "{{source_dir()}}/src-go" main.go {{ARGS}}
# Install git alias for git-cross (default: go)
[no-cd]
@install impl="go":
just --justfile "{{source_dir()}}/Justfile.cross" install {{impl}}
#_idea:
# REPO_DIR=$(git rev-parse --show-toplevel) \
# just --justfile "{{source_dir()}}/Justfile.cross" {{ARGS}}