2525 echo "Install: build-essential (Linux) or Xcode CLI Tools (macOS)"
2626 exit 1
2727 fi
28- - CGO_ENABLED=1 go build -ldflags "-X github.com/inference-gateway/cli/cmd.version={{.VERSION}} -X github.com/inference-gateway/cli/cmd.commit={{.COMMIT}} -X github.com/inference-gateway/cli/cmd.date={{.DATE}}" -o {{.BINARY_NAME}} {{.MAIN_PACKAGE}}
28+ - CGO_ENABLED=1 go build -tags libsqlite3 - ldflags "-w -s -X github.com/inference-gateway/cli/cmd.version={{.VERSION}} -X github.com/inference-gateway/cli/cmd.commit={{.COMMIT}} -X github.com/inference-gateway/cli/cmd.date={{.DATE}}" -o {{.BINARY_NAME}} {{.MAIN_PACKAGE}}
2929 sources :
3030 - " **/*.go"
3131 - go.mod
3636 install :
3737 desc : Install the CLI from source
3838 cmds :
39- - CGO_ENABLED=1 go build -ldflags "-X github.com/inference-gateway/cli/cmd.version={{.VERSION}} -X github.com/inference-gateway/cli/cmd.commit={{.COMMIT}} -X github.com/inference-gateway/cli/cmd.date={{.DATE}}" -o $(go env GOPATH)/bin/{{.BINARY_NAME}} {{.MAIN_PACKAGE}}
39+ - CGO_ENABLED=1 go build -tags libsqlite3 - ldflags "-w -s -X github.com/inference-gateway/cli/cmd.version={{.VERSION}} -X github.com/inference-gateway/cli/cmd.commit={{.COMMIT}} -X github.com/inference-gateway/cli/cmd.date={{.DATE}}" -o $(go env GOPATH)/bin/{{.BINARY_NAME}} {{.MAIN_PACKAGE}}
4040
4141 clean :
4242 desc : Clean build artifacts
@@ -47,17 +47,17 @@ tasks:
4747 test :
4848 desc : Run all tests
4949 cmds :
50- - CGO_ENABLED=1 go test ./...
50+ - CGO_ENABLED=1 go test -tags libsqlite3 ./...
5151
5252 test:verbose :
5353 desc : Run tests with verbose output
5454 cmds :
55- - CGO_ENABLED=1 go test -v ./...
55+ - CGO_ENABLED=1 go test -tags libsqlite3 - v ./...
5656
5757 test:coverage :
5858 desc : Run tests with coverage report
5959 cmds :
60- - CGO_ENABLED=1 go test -cover ./...
60+ - CGO_ENABLED=1 go test -tags libsqlite3 - cover ./...
6161
6262 lint :
6363 desc : Run linter (requires golangci-lint)
@@ -154,10 +154,10 @@ tasks:
154154 desc : Build release binaries for multiple platforms (Linux only - macOS builds require native runners)
155155 cmds :
156156 - mkdir -p dist
157- - CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/inference-gateway/cli/cmd.version={{.VERSION}} -X github.com/inference-gateway/cli/cmd.commit={{.COMMIT}} -X github.com/inference-gateway/cli/cmd.date={{.DATE}}" -o dist/{{.BINARY_NAME}}-linux-amd64 {{.MAIN_PACKAGE}}
157+ - CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -tags libsqlite3 - ldflags "-w -s -X github.com/inference-gateway/cli/cmd.version={{.VERSION}} -X github.com/inference-gateway/cli/cmd.commit={{.COMMIT}} -X github.com/inference-gateway/cli/cmd.date={{.DATE}}" -o dist/{{.BINARY_NAME}}-linux-amd64 {{.MAIN_PACKAGE}}
158158 - |
159159 if command -v aarch64-linux-gnu-gcc >/dev/null 2>&1; then
160- CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "-X github.com/inference-gateway/cli/cmd.version={{.VERSION}} -X github.com/inference-gateway/cli/cmd.commit={{.COMMIT}} -X github.com/inference-gateway/cli/cmd.date={{.DATE}}" -o dist/{{.BINARY_NAME}}-linux-arm64 {{.MAIN_PACKAGE}}
160+ CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -tags libsqlite3 - ldflags "-w -s -X github.com/inference-gateway/cli/cmd.version={{.VERSION}} -X github.com/inference-gateway/cli/cmd.commit={{.COMMIT}} -X github.com/inference-gateway/cli/cmd.date={{.DATE}}" -o dist/{{.BINARY_NAME}}-linux-arm64 {{.MAIN_PACKAGE}}
161161 else
162162 echo "⚠ ARM64 cross-compiler not found, skipping linux-arm64 build"
163163 echo " Install: gcc-aarch64-linux-gnu (or build on ARM64 machine)"
@@ -178,7 +178,7 @@ tasks:
178178 sh : go env GOARCH
179179 cmds :
180180 - mkdir -p dist
181- - CGO_ENABLED=1 GOOS=darwin GOARCH={{.GOARCH}} go build -ldflags "-X github.com/inference-gateway/cli/cmd.version={{.VERSION}} -X github.com/inference-gateway/cli/cmd.commit={{.COMMIT}} -X github.com/inference-gateway/cli/cmd.date={{.DATE}}" -o dist/{{.BINARY_NAME}}-darwin-{{.GOARCH}} {{.MAIN_PACKAGE}}
181+ - CGO_ENABLED=1 GOOS=darwin GOARCH={{.GOARCH}} go build -tags libsqlite3 - ldflags "-w -s -X github.com/inference-gateway/cli/cmd.version={{.VERSION}} -X github.com/inference-gateway/cli/cmd.commit={{.COMMIT}} -X github.com/inference-gateway/cli/cmd.date={{.DATE}}" -o dist/{{.BINARY_NAME}}-darwin-{{.GOARCH}} {{.MAIN_PACKAGE}}
182182
183183 container:build :
184184 desc : Build container image locally for testing
0 commit comments