diff --git a/.gitignore b/.gitignore index 911e97cb..976800d2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ yarn-error.log .idea/* telepresence.log venonactl/dist/* +venonactl-linux venonalog.json diff --git a/package.json b/package.json index ec210b82..6bf9fa66 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "venona", - "version": "0.20.0", + "version": "0.20.1", "description": "Codefresh agent to run on Codefresh's runtime environment and execute pipeline", "main": "index.js", "scripts": { diff --git a/venonactl/Makefile b/venonactl/Makefile index 1b7f9b33..aeacf60f 100644 --- a/venonactl/Makefile +++ b/venonactl/Makefile @@ -2,4 +2,7 @@ build: build-local build-local: - sh ./hack/build.sh \ No newline at end of file + @sh ./hack/build.sh + +build-linux: + @sh ./hack/build-linux.sh \ No newline at end of file diff --git a/venonactl/cmd/cmdutils.go b/venonactl/cmd/cmdutils.go index 6cbadaaf..abec9ae1 100644 --- a/venonactl/cmd/cmdutils.go +++ b/venonactl/cmd/cmdutils.go @@ -98,6 +98,9 @@ func extendStoreWithCodefershClient(logger logger.Logger) error { logger.Debug("Using codefresh context", "Context-Name", context.Name, "Host", cfAPIHost) } else { logger.Debug("Reading creentials from environment variables") + if cfAPIHost == "" { + cfAPIHost = "https://g.codefresh.io" + } } client := codefresh.New(&codefresh.ClientOptions{ diff --git a/venonactl/hack/build-linux.sh b/venonactl/hack/build-linux.sh new file mode 100755 index 00000000..a9483246 --- /dev/null +++ b/venonactl/hack/build-linux.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e +OUTFILE=$PWD/venonactl-linux +go generate ${PWD}/hack/generate.go +GOOS=linux GOARCH=386 go build -ldflags '-X github.com/codefresh-io/venona/venonactl/cmd.localDevFlow=true' -o $OUTFILE main.go + +chmod +x $OUTFILE \ No newline at end of file