From f53b0b974f7b903fccfd7e77b4c886bfb2d718c0 Mon Sep 17 00:00:00 2001 From: Ivan Petkov Date: Fri, 8 Nov 2024 10:25:05 -0800 Subject: [PATCH] buildTrunkPackage: set --release=true on newer trunk versions (#736) --- CHANGELOG.md | 4 ++++ lib/buildTrunkPackage.nix | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3544f56..0af2f35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased +### Fixed +* `buildTrunkPackage` will pass in `--release=true` (instead of just + `--release`) for trunk versions 0.21 or higher to avoid argument ambiguities + ## [0.19.1] - 2024-10-12 ### Added diff --git a/lib/buildTrunkPackage.nix b/lib/buildTrunkPackage.nix index 6fa844d..e2c7d4d 100644 --- a/lib/buildTrunkPackage.nix +++ b/lib/buildTrunkPackage.nix @@ -84,7 +84,7 @@ mkCargoDerivation (args // { buildPhaseCargoCommand = args.buildPhaseCommand or '' local profileArgs="" if [[ "$CARGO_PROFILE" == "release" ]]; then - profileArgs="--release" + profileArgs="--release${lib.optionalString (lib.versionAtLeast trunk.version "0.21") "=true"}" fi trunk ${trunkExtraArgs} build $profileArgs ${trunkExtraBuildArgs} "${trunkIndexPath}"