Installing from binary distributions #
Homebrew #
brew tap go-swagger/go-swagger
brew install go-swagger
Linuxbrew #
brew tap go-swagger/go-swagger
brew install go-swagger
Debian packages #
This package will work for any Debian. The only file it contains gets copied to /usr/bin
- Update and install prerequisite packages
sudo apt update
sudo apt install -y apt-transport-https gnupg curl debian-keyring debian-archive-keyring
- Register our GPG signing key
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/gpg.2F8CB673971B5C9E.key' | sudo gpg --dearmor -o /usr/share/keyrings/go-swagger-go-swagger-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/config.deb.txt?distro=debian&codename=any-version' | sudo tee /etc/apt/sources.list.d/go-swagger-go-swagger.list
- Install
sudo apt update
sudo apt install swagger
RPM packages #
This package should work on any distro that wants RPM packages. The only file it contains gets copied to /usr/bin
- Update and install prerequisite packages
dnf install -y yum-utils
- Register our GPG signing key
rpm --import 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/gpg.2F8CB673971B5C9E.key'
- Install
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/config.rpm.txt?distro=fedora&codename=any-version' > /tmp/go-swagger-go-swagger.repo
dnf config-manager --add-repo '/tmp/go-swagger-go-swagger.repo'
dnf -q makecache -y --disablerepo='*' --enablerepo='go-swagger-go-swagger' --enablerepo='go-swagger-go-swagger-source'
dnf install -y swagger
At this moment, we do not support pre-packaged binaries for Windows.
Static binary #
You can also download a binary for your platform from github:
https://github.com/go-swagger/go-swagger/releases/latest
We currently release binary builds for the following platforms:
- darwin AMD64 (MacOS)
- darwin ARM64
- linux AMD64
- linux ARM
- linux ARM64
- linux PPC64le
- linux s390x
- windows AMD64
- window ARM64
dir=$(mktemp -d)
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 $dir/swagger -L'#' "$download_url"
sudo install $dir/swagger /usr/local/bin