aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-publish.sh27
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