github.com/Percona-Lab/go-swagger@v0.19.0/docs/install.md (about) 1 # Installing 2 3 **IMPORTANT NOTE**: `go-swagger` is a tool to mainly generate or analyze source code. In order to make it work after successful 4 installation, see [the prerequisites](https://goswagger.io/generate/requirements.html) on your development environment. 5 6 ## Installing from binary distributions 7 8 go-swagger releases are distributed as binaries that are built from signed tags. It is published [as github release](https://github.com/go-swagger/go-swagger/tags), 9 rpm, deb and docker image. 10 11 ### Docker image [![Docker Repository on Quay](https://quay.io/repository/goswagger/swagger/status "Docker Repository on Quay")](https://quay.io/repository/goswagger/swagger) 12 13 ``` 14 docker pull quay.io/goswagger/swagger 15 16 alias swagger="docker run --rm -it -e GOPATH=$HOME/go:/go -v $HOME:$HOME -w $(pwd) quay.io/goswagger/swagger" 17 swagger version 18 ``` 19 20 ### Homebrew/Linuxbrew 21 22 ``` 23 brew tap go-swagger/go-swagger 24 brew install go-swagger 25 ``` 26 27 ### Static binary 28 29 You can download a binary for your platform from github: 30 <https://github.com/go-swagger/go-swagger/releases/latest> 31 32 ``` 33 download_url=$(curl -s https://api.github.com/repos/go-swagger/go-swagger/releases/latest | \ 34 jq -r '.assets[] | select(.name | contains("'"$(uname | tr '[:upper:]' '[:lower:]')"'_amd64")) | .browser_download_url') 35 curl -o /usr/local/bin/swagger -L'#' "$download_url" 36 chmod +x /usr/local/bin/swagger 37 ``` 38 39 ### Debian packages [ ![Download](https://api.bintray.com/packages/go-swagger/goswagger-debian/swagger/images/download.svg) ](https://bintray.com/go-swagger/goswagger-debian/swagger/_latestVersion) 40 41 This repo will work for any debian, the only file it contains gets copied to `/usr/bin` 42 43 ``` 44 echo "deb https://dl.bintray.com/go-swagger/goswagger-debian ubuntu main" | sudo tee -a /etc/apt/sources.list 45 ``` 46 47 ### RPM packages [ ![Download](https://api.bintray.com/packages/go-swagger/goswagger-rpm/swagger/images/download.svg) ](https://bintray.com/go-swagger/goswagger-rpm/swagger/_latestVersion) 48 49 This repo should work on any distro that wants rpm packages, the only file it contains gets copied to `/usr/bin` 50 51 ``` 52 wget https://bintray.com/go-swagger/goswagger-rpm/rpm -O bintray-go-swagger-goswagger-rpm.repo 53 ``` 54 55 56 ### Installing from source 57 58 Install or update from current source master: 59 60 ``` 61 go get -u github.com/go-swagger/go-swagger/cmd/swagger 62 ``` 63 64 You are welcome to clone this repo and start contributing: 65 ``` 66 cd $GOPATH/src 67 mkdir -p github.com/go-swagger 68 cd github.com/go-swagger 69 git clone https://github.com/go-swagger/go-swagger 70 ``` 71 72 > **NOTE**: go-swagger works on *nix as well as Windows OS