Ignore vendor dir for builds without modules.txt
This commit is contained in:
parent
5cdb3ae131
commit
dfacdf45a7
|
|
@ -55,6 +55,9 @@ export CGO_ENABLED=1
|
||||||
export GOCACHE="$PROJECT_ROOT/.cache/go-build"
|
export GOCACHE="$PROJECT_ROOT/.cache/go-build"
|
||||||
export GOMODCACHE="$PROJECT_ROOT/.cache/go-mod"
|
export GOMODCACHE="$PROJECT_ROOT/.cache/go-mod"
|
||||||
mkdir -p "$GOCACHE" "$GOMODCACHE"
|
mkdir -p "$GOCACHE" "$GOMODCACHE"
|
||||||
|
if [ -d "$PROJECT_ROOT/vendor" ] && [ ! -f "$PROJECT_ROOT/vendor/modules.txt" ]; then
|
||||||
|
export GOFLAGS="${GOFLAGS:-} -mod=mod"
|
||||||
|
fi
|
||||||
if go build -o "$BUILD_OUTPUT" .; then
|
if go build -o "$BUILD_OUTPUT" .; then
|
||||||
echo "Build successful! (VideoTools $APP_VERSION)"
|
echo "Build successful! (VideoTools $APP_VERSION)"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,9 @@ case "$OS" in
|
||||||
|
|
||||||
echo "Building VideoTools $APP_VERSION for Windows..."
|
echo "Building VideoTools $APP_VERSION for Windows..."
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
|
if [ -d "$PROJECT_ROOT/vendor" ] && [ ! -f "$PROJECT_ROOT/vendor/modules.txt" ]; then
|
||||||
|
export GOFLAGS="${GOFLAGS:-} -mod=mod"
|
||||||
|
fi
|
||||||
if go build -ldflags="-H windowsgui -s -w" -o VideoTools.exe .; then
|
if go build -ldflags="-H windowsgui -s -w" -o VideoTools.exe .; then
|
||||||
echo "Build successful! (VideoTools $APP_VERSION)"
|
echo "Build successful! (VideoTools $APP_VERSION)"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user