diff --git a/justfile b/justfile index 4d14a3d3..d659b731 100644 --- a/justfile +++ b/justfile @@ -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 diff --git a/validator/.justfile b/justfile-rust similarity index 71% rename from validator/.justfile rename to justfile-rust index d4d6e8e0..c9dca411 100644 --- a/validator/.justfile +++ b/justfile-rust @@ -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' @@ -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 @@ -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 }}