Open ee7 opened 2 months ago
Do not merge as is. I thought I verified that this worked, but on double checking it seems like this PR currently causes release builds to no longer be stripped.
And given this Nimble file:
version = "0.1.0"
author = "Anonymous"
description = "A new awesome nimble package"
license = "MIT"
srcDir = "src"
bin = @["mypackage"]
requires "nim >= 2.0.0"
after build:
when defined(release):
echo "foo"
When I run:
nimble build -d:release
or
nimble -d:release build
I don't see foo
. I thought that worked nowadays - I'm probably doing something stupid. I'll get back to this.
The post-build hook attempted to strip only release builds, but it stripped all builds because Nimble doesn't support checking custom defines in a nimble file. Check against
release
instead, which is built-in.Before this PR:
With this PR:
Closes: https://github.com/crashappsec/chalk/issues/288
Testing
nimble build -d:debug
, and verify that the binary is not strippednimble build
, and verify that the binary is stripped