Skip to content

Commit

Permalink
Merge pull request #748 from bparees/strip_debug
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored May 12, 2017
2 parents b3700cc + 4de5b4c commit f519129
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hack/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tar -rf "${context}/archive.tar" -C "${context}" sti-version-defs
gzip -f "${context}/archive.tar"

# Perform the build and release in Docker.
cat "${context}/archive.tar.gz" | docker run -i --cidfile="${context}/cid" openshift/sti-release
cat "${context}/archive.tar.gz" | docker run -i --cidfile="${context}/cid" -e RELEASE_LDFLAGS="-w -s" openshift/sti-release
docker cp $(cat ${context}/cid):/go/src/github.com/openshift/source-to-image/_output/local/releases "${S2I_OUTPUT}"
echo "${S2I_GIT_COMMIT}" > "${S2I_LOCAL_RELEASEPATH}/.commit"

Expand Down
5 changes: 3 additions & 2 deletions hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ S2I_OUTPUT_BINPATH="${S2I_OUTPUT}/bin"
S2I_OUTPUT_PKGDIR="${S2I_OUTPUT}/pkgdir"
S2I_LOCAL_BINPATH="${S2I_OUTPUT}/go/bin"
S2I_LOCAL_RELEASEPATH="${S2I_OUTPUT}/releases"
RELEASE_LDFLAGS=${RELEASE_LDFLAGS:-""}


readonly S2I_GO_PACKAGE=github.com/openshift/source-to-image
readonly S2I_GOPATH="${S2I_OUTPUT}/go"
Expand Down Expand Up @@ -89,7 +91,7 @@ s2i::build::build_binaries() {
echo "++ Building go targets for ${platform}:" "${targets[@]}"
CGO_ENABLED=0 go install "${goflags[@]:+${goflags[@]}}" \
-pkgdir "${S2I_OUTPUT_PKGDIR}" \
-ldflags "${version_ldflags}" \
-ldflags "${version_ldflags} ${RELEASE_LDFLAGS}" \
"${binaries[@]}"
s2i::build::unset_platform_envs "${platform}"
done
Expand Down Expand Up @@ -474,7 +476,6 @@ s2i::build::ldflags() {
ldflags+=($(s2i::build::ldflag "minorFromGit" "${S2I_GIT_MINOR}"))
ldflags+=($(s2i::build::ldflag "versionFromGit" "${S2I_GIT_VERSION}"))
ldflags+=($(s2i::build::ldflag "commitFromGit" "${S2I_GIT_COMMIT}"))

# The -ldflags parameter takes a single string, so join the output.
echo "${ldflags[*]-}"
)
Expand Down

0 comments on commit f519129

Please sign in to comment.