diff options
author | Galen Guyer <galen@galenguyer.com> | 2022-08-31 13:26:38 -0400 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2022-08-31 13:26:38 -0400 |
commit | f983247266ffc94b5adf6cfa8e531a36d18a8b85 (patch) | |
tree | dc890b3ed9c3a11e9a14404d66b77146b3765150 | |
parent | b8f0569e23d12dac26831249c05d872cf80b1e55 (diff) |
Add custom build scriptmaster
-rwxr-xr-x | build-publish.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/build-publish.sh b/build-publish.sh new file mode 100755 index 0000000000..3649411dce --- /dev/null +++ b/build-publish.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# build and upload dockerd binaries + +# exit if a command fails +set -o errexit + +# exit if required variables aren't set +set -o nounset + +rev="$(git rev-parse --short HEAD)" +echo "on git revision $rev" + +# build the static binaries +make binary + +# rename dockerd files +sha256sum bundles/binary-daemon/dockerd | cut -d " " -f 1 > bundles/binary-daemon/dockerd.sha256 +md5sum bundles/binary-daemon/dockerd | cut -d " " -f 1 > bundles/binary-daemon/dockerd.md5 + +# sign dockerd file +gpg --output ./bundles/binary-daemon/dockerd.sig --detach-sig ./bundles/binary-daemon/dockerd + +# upload to azure +if command -v rlcone &>/dev/null; then + rclone copy --verbose ./bundles/binary-daemon/ --include="dockerd{,.md5,.sha256,.sig}" galenguyer:moby/"$(git rev-parse --short HEAD)"/ + rclone copy --verbose ./bundles/binary-daemon/ --include="dockerd{,.md5,.sha256,.sig}" galenguyer:moby/ +fi |