diff --git a/script/build b/script/build index c2b737cf..8d403287 100755 --- a/script/build +++ b/script/build @@ -45,6 +45,7 @@ fi GIT_SHA=`git rev-parse --short HEAD` VERSION=`git rev-parse --abbrev-ref HEAD` LDFLAGS="-X github.com/dremio/dremio-diagnostic-collector/pkg/versions.GitSha=$GIT_SHA -X github.com/dremio/dremio-diagnostic-collector/pkg/versions.Version=$VERSION" +touch ./cmd/root/ddcbinary/output/ddc.zip GOOS=linux GOARCH=amd64 go build -ldflags "$LDFLAGS" -o ./bin/ddc zip ./bin/ddc.zip ./bin/ddc mv ./bin/ddc.zip ./cmd/root/ddcbinary/output/ddc.zip diff --git a/script/build.ps1 b/script/build.ps1 index e73a7f4d..e848f3ec 100644 --- a/script/build.ps1 +++ b/script/build.ps1 @@ -13,6 +13,7 @@ $GIT_SHA = git rev-parse --short HEAD $VERSION = git rev-parse --abbrev-ref HEAD $LDFLAGS = "-X github.com/dremio/dremio-diagnostic-collector/pkg/versions.GitSha=$GIT_SHA -X github.com/dremio/dremio-diagnostic-collector/pkg/versions.Version=$VERSION" +New-Item -ItemType File -Path ./cmd/root/ddcbinary/output/ddc.zip -Force # This assumes that you have 'go' installed in your environment $env:GOOS="linux" $env:GOARCH="amd64"