You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2019/10/03 12:32:06 UTC
[camel-k] branch master updated: fix #972: strip local host data
from build
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/master by this push:
new bee432b fix #972: strip local host data from build
bee432b is described below
commit bee432b2e0896b3b5c5bdc29126ee2d798198012
Author: nferraro <ni...@gmail.com>
AuthorDate: Thu Oct 3 13:17:08 2019 +0200
fix #972: strip local host data from build
---
script/Makefile | 5 +----
script/cross_compile.sh | 12 ++++++------
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/script/Makefile b/script/Makefile
index b2736df..02480f5 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -29,9 +29,6 @@ GO_PATH := $(shell go env GOPATH)
LINT_GOGC := 10
LINT_DEADLINE := 5m
-# For signing binary artifacts
-GPG_PASS := $(GPG_PASS)
-
# Used to push pre-relase artifacts
STAGING_IMAGE_NAME := docker.io/camelk/camel-k
@@ -181,7 +178,7 @@ git-tag:
./script/git_tag.sh $(VERSION) $(RELEASE_GIT_REMOTE)
cross-compile:
- ./script/cross_compile.sh $(VERSION) $(GPG_PASS)
+ ./script/cross_compile.sh $(VERSION) '$(GOFLAGS)'
package-examples:
./script/package_examples.sh $(VERSION)
diff --git a/script/cross_compile.sh b/script/cross_compile.sh
index 001b4e9..264384b 100755
--- a/script/cross_compile.sh
+++ b/script/cross_compile.sh
@@ -22,13 +22,13 @@ rm -rf ${builddir}
basename=camel-k-client
-if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
- echo "usage: $0 version [pgp_pass]"
+if [ "$#" -ne 2 ]; then
+ echo "usage: $0 version build_flags"
exit 1
fi
version=$1
-gpg_pass=$2
+build_flags=$2
cross_compile () {
local label=$1
@@ -41,10 +41,10 @@ cross_compile () {
fi
targetdir=${builddir}/${label}
- go build -o ${targetdir}/kamel${extension} ./cmd/kamel/...
+ eval go build "$build_flags" -o ${targetdir}/kamel${extension} ./cmd/kamel/...
- if [ -n "$gpg_pass" ]; then
- gpg --output ${targetdir}/kamel${extension}.asc --armor --detach-sig --passphrase ${gpg_pass} ${targetdir}/kamel${extension}
+ if [ -n "$GPG_PASS" ]; then
+ gpg --output ${targetdir}/kamel${extension}.asc --armor --detach-sig --passphrase ${GPG_PASS} ${targetdir}/kamel${extension}
fi
pushd . && cd ${targetdir} && sha512sum -b kamel${extension} > kamel${extension}.sha512 && popd