Skip to content

Commit

Permalink
Moved ./validator/.justfile to ./justfile-rust
Browse files Browse the repository at this point in the history
  • Loading branch information
alpeb committed Dec 1, 2023
1 parent a7397d3 commit 5985185
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
3 changes: 2 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ rs-check-dir dir *flags:
##

validator *args:
{{ just_executable() }} --justfile=validator/.justfile {{ args }}
TARGETCRATE=linkerd-network-validator \
{{ just_executable() }} --justfile=justfile-rust {{ args }}

##
## cni-plugin
Expand Down
23 changes: 13 additions & 10 deletions validator/.justfile → justfile-rust
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# This justfile includes recipes for building and packaging the validator for
# release. This file is separated so that we can invoke cargo, etc when building
# defaults. If this logic were in the top-level justfile, then these tools would
# be invoked (possibly updating Rust, etc), for unrelated targets.
# This justfile includes recipes for building and packaging the validator and
# reinitialize-pods crates for release. This file is separated so that we can
# invoke cargo, etc when building defaults. If this logic were in the main
# justfile, then these tools would be invoked (possibly updating Rust, etc),
# for unrelated targets.
#
# Users are expected to interact with this via the top-level Justfile.
# Users are expected to interact with this via the main Justfile.

crate := env_var('TARGETCRATE')

# The version name to use for packages.
version := `just-cargo crate-version linkerd-network-validator`
version := `just-cargo crate-version {{crate}}`

profile := 'debug'

Expand All @@ -26,12 +29,12 @@ _cargo-target := if arch == "amd64" {
}

_target-dir := "../target" / _cargo-target / profile
_target-bin := _target-dir / "linkerd-network-validator"
_target-bin := _target-dir / crate

_package-name := "linkerd-network-validator-" + version + "-" + arch
_package-name := crate + "-" + version + "-" + arch
_package-tgz := "../target/package" / _package-name + ".tgz"
_package-dir := "../target/package" / _package-name
_package-bin := _package-dir / "linkerd-network-validator"
_package-bin := _package-dir / crate
_package-dbg := _package-bin + ".dbg"

_cargo := 'just-cargo profile=' + profile + ' target=' + _cargo-target
Expand All @@ -49,4 +52,4 @@ package: build

build *flags:
{{ _cargo }} fetch --locked
{{ _cargo }} build --workspace -p linkerd-network-validator {{ flags }}
{{ _cargo }} build --workspace -p {{ crate }} {{ flags }}

0 comments on commit 5985185

Please sign in to comment.