Skip to content

Commit ce931f2

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>
1 parent ac73065 commit ce931f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hack/make/.go-autogen

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

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

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

0 commit comments

Comments
 (0)