Fix Windows build GOFLAGS issue - move gstreamer tags to build command
This commit is contained in:
parent
c039ed2753
commit
e794666445
|
|
@ -82,8 +82,7 @@ case "$OS" in
|
||||||
echo ""
|
echo ""
|
||||||
echo "Building VideoTools $FULL_VERSION for Windows..."
|
echo "Building VideoTools $FULL_VERSION for Windows..."
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
# GStreamer is always enabled (mandatory dependency on supported platforms)
|
# Set module flag if needed
|
||||||
export GOFLAGS="${GOFLAGS:-} -tags gstreamer"
|
|
||||||
if [ -d "$PROJECT_ROOT/vendor" ] && [ ! -f "$PROJECT_ROOT/vendor/modules.txt" ]; then
|
if [ -d "$PROJECT_ROOT/vendor" ] && [ ! -f "$PROJECT_ROOT/vendor/modules.txt" ]; then
|
||||||
export GOFLAGS="${GOFLAGS:-} -mod=mod"
|
export GOFLAGS="${GOFLAGS:-} -mod=mod"
|
||||||
fi
|
fi
|
||||||
|
|
@ -91,7 +90,7 @@ case "$OS" in
|
||||||
if [ -n "$GIT_COMMIT" ]; then
|
if [ -n "$GIT_COMMIT" ]; then
|
||||||
LDFLAGS="$LDFLAGS -X main.buildCommit=$GIT_COMMIT"
|
LDFLAGS="$LDFLAGS -X main.buildCommit=$GIT_COMMIT"
|
||||||
fi
|
fi
|
||||||
if go build -ldflags="$LDFLAGS" -o VideoTools.exe .; then
|
if go build -tags gstreamer -ldflags="$LDFLAGS" -o VideoTools.exe .; then
|
||||||
build_end=$(date +%s)
|
build_end=$(date +%s)
|
||||||
build_secs=$((build_end - build_start))
|
build_secs=$((build_end - build_start))
|
||||||
echo "Build successful! (VideoTools $FULL_VERSION)"
|
echo "Build successful! (VideoTools $FULL_VERSION)"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user