Skip to content

Commit

Permalink
Merge pull request #8263 from mikesplain/protokube_mac_build
Browse files Browse the repository at this point in the history
Fix protokube osx build
  • Loading branch information
k8s-ci-robot committed Jan 3, 2020
2 parents 35039d2 + ef21fb0 commit f7e6091
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ push-node-authorizer:
bazel-protokube-export:
mkdir -p ${BAZELIMAGES}
bazel build ${BAZEL_CONFIG} --action_env=PROTOKUBE_TAG=${PROTOKUBE_TAG} --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //images:protokube.tar.gz //images:protokube.tar.gz.sha1 //images:protokube.tar.gz.sha256
cp -fp bazel-bin/images/bazel-out/k8-fastbuild/bin/images/protokube.tar.gz ${BAZELIMAGES}/protokube.tar.gz
cp -fp bazel-bin/images/protokube.tar.gz ${BAZELIMAGES}/protokube.tar.gz
cp -fp bazel-bin/images/protokube.tar.gz.sha1 ${BAZELIMAGES}/protokube.tar.gz.sha1
cp -fp bazel-bin/images/protokube.tar.gz.sha256 ${BAZELIMAGES}/protokube.tar.gz.sha256

Expand Down
3 changes: 2 additions & 1 deletion tools/gzip.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
def _impl(ctx):
in_file = ctx.file.src

out_file = ctx.actions.declare_file("%s.gz" % in_file.path)
basename = ctx.attr.src.label.name
out_file = ctx.actions.declare_file("%s.gz" % basename)

cmd = "gzip -c '%s' > '%s'" % (in_file.path, out_file.path)

Expand Down
4 changes: 2 additions & 2 deletions tools/sha1
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ set -o pipefail
in=$1
out=$2

if ( which sha1sum > /dev/null ); then
if ( command -v sha1sum > /dev/null ); then
(sha1sum $in | cut -d' ' -f1) > $out
elif ( which shasum > /dev/null ); then
elif ( command -v shasum > /dev/null ); then
(shasum -a 1 $in | cut -d' ' -f1) > $out
else
echo "Neither sha1sum nor shasum command is available"
Expand Down
4 changes: 2 additions & 2 deletions tools/sha256
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ set -o pipefail
in=$1
out=$2

if ( which sha256sum > /dev/null ); then
if ( command -v sha256sum > /dev/null ); then
(sha256sum $in | cut -d' ' -f1) > $out
elif ( which shasum > /dev/null ); then
elif ( command -v shasum > /dev/null ); then
(shasum -a 256 $in | cut -d' ' -f1) > $out
else
echo "Neither sha256sum nor shasum command is available"
Expand Down

0 comments on commit f7e6091

Please sign in to comment.