Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 60e2f6b

Browse files
committed
Windows: Only set VERSION_QUAD if unset
When trying to build with some pretty typical version strings this was causing failures trying to generate the windows resource file. The resource file is already gated by an `ifdef` for this var, so instead of blindly setting based on "VERSION", which can contain some characters which are incompatible (e.g. 1.2.3.rc.0 will fail due to the ".rc"). Signed-off-by: Brian Goff <cpuguy83@gmail.com> (cherry picked from commit ce931f28ea8768baa7ca2725d9030fbf8a40d3ba) Signed-off-by: Brian Goff <cpuguy83@gmail.com> Upstream-commit: d699e3de12df8d3b8e497b89c9fea143dd84b596 Component: engine
1 parent 78173b2 commit 60e2f6b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

components/engine/hack/make/.go-autogen

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ if [ "$(go env GOOS)" = "windows" ]; then
5858
fi
5959

6060
# Generate a Windows file version of the form major,minor,patch,build (with any part optional)
61-
VERSION_QUAD=$(echo -n $VERSION | sed -re 's/^([0-9.]*).*$/\1/' | tr . ,)
61+
if [ ! -v VERSION_QUAD ]; then
62+
VERSION_QUAD=$(echo -n $VERSION | sed -re 's/^([0-9.]*).*$/\1/' | tr . ,)
63+
fi
6264

6365
# Pass version and commit information into the resource compiler
6466
defs=

0 commit comments

Comments
 (0)