Fix gz path to work on macos

This commit is contained in:
mikesplain 2020-01-03 15:25:21 -05:00
parent 202b9cfe21
commit ef21fb0d91
No known key found for this signature in database
GPG Key ID: D5E91A3C9BBEA323
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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)