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>
| ... | ... |
@@ -57,7 +57,9 @@ if [ "$(go env GOOS)" = "windows" ]; then |
| 57 | 57 |
fi |
| 58 | 58 |
|
| 59 | 59 |
# 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 |
|
| 61 | 63 |
|
| 62 | 64 |
# Pass version and commit information into the resource compiler |
| 63 | 65 |
defs= |