summaryrefslogtreecommitdiff
path: root/contrib/cirrus/build_swagger.sh
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-17 21:55:11 +0100
committerGitHub <noreply@github.com>2020-01-17 21:55:11 +0100
commit3b6a843eb2942ec4093072f4a6468a57f19de5cb (patch)
tree81de580baddb004e7cb18f1111f65577f13cdef8 /contrib/cirrus/build_swagger.sh
parentab7e1a4c400f4bdb47ab49a2a0c8ef9508c68e02 (diff)
parent9be6f30a42a8737f7e853dc3333b627242a962ab (diff)
downloadpodman-3b6a843eb2942ec4093072f4a6468a57f19de5cb.tar.gz
podman-3b6a843eb2942ec4093072f4a6468a57f19de5cb.tar.bz2
podman-3b6a843eb2942ec4093072f4a6468a57f19de5cb.zip
Merge pull request #4895 from cevich/swagpublish
[CI:DOCS] Post-process swagger yaml and publish
Diffstat (limited to 'contrib/cirrus/build_swagger.sh')
-rwxr-xr-xcontrib/cirrus/build_swagger.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/cirrus/build_swagger.sh b/contrib/cirrus/build_swagger.sh
new file mode 100755
index 000000000..0471f0c10
--- /dev/null
+++ b/contrib/cirrus/build_swagger.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+source $(dirname $0)/lib.sh
+
+# Building this is a PITA, just grab binary for use in automation
+# Ref: https://goswagger.io/install.html#static-binary
+download_url=$(curl -s https://api.github.com/repos/go-swagger/go-swagger/releases/latest | \
+ jq -r '.assets[] | select(.name | contains("'"$(uname | tr '[:upper:]' '[:lower:]')"'_amd64")) | .browser_download_url')
+curl -o /usr/local/bin/swagger -L'#' "$download_url"
+chmod +x /usr/local/bin/swagger
+
+cd $GOSRC
+make swagger
+echo "Preserving build details for later use."
+mv -v release.txt actual_release.txt # Another 'make' during testing could overwrite it