github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/contrib/cirrus/build_swagger.sh (about) 1 #!/bin/bash 2 3 set -e 4 5 source $(dirname $0)/lib.sh 6 7 # Building this is a PITA, just grab binary for use in automation 8 # Ref: https://goswagger.io/install.html#static-binary 9 download_url=$(curl -s https://api.github.com/repos/go-swagger/go-swagger/releases/latest | \ 10 jq -r '.assets[] | select(.name | contains("'"$(uname | tr '[:upper:]' '[:lower:]')"'_amd64")) | .browser_download_url') 11 curl -o /usr/local/bin/swagger -L'#' "$download_url" 12 chmod +x /usr/local/bin/swagger 13 14 cd $GOSRC 15 make swagger 16 echo "Preserving build details for later use." 17 mv -v release.txt actual_release.txt # Another 'make' during testing could overwrite it