Interested in contributing to Spinnaker? Please review the contribution documentation.
Clone the repository to a directory outside of your GOPATH:
$ git clone https://github.com/spinnaker/spinAfterward, use go build to build the program. This will automatically fetch dependencies.
$ go buildUpon first build, you may see output while the go tool fetches dependencies.
To verify dependencies match checksums under go.sum, run go mod verify.
To clean up any old, unused go.mod or go.sum lines, run go mod tidy.
Run using
./spin <cmds> <flags>Test using
go test -v ./...from the root spin/ directory.
Spin CLI uses Swagger to generate the API client library for Gate.
Spin CLI's master should be using Gate's master swagger definition. Similarly, each spin release version version-{major}.{minor}.x should match Gate's tag version-{major}.{minor}.
Example:
| Spin CLI version | Gate version |
|---|---|
| version-1.17.3 | version-1.17.0 |
| version-1.17.2 | version-1.17.0 |
| version-1.17.1 | version-1.17.0 |
To update the client library:
- Use the Swagger Codegen to generate the new library and drop it into the spin project
GATE_REPO_PATH=PATH_TO_YOUR_GATE_REPO SWAGGER_CODEGEN_VERSION=$(cat gateapi/.swagger-codegen/VERSION) rm -rf gateapi/ \ && docker run -it \ -v "${GATE_REPO_PATH}/swagger/:/tmp/gate" \ -v "$PWD/gateapi/:/tmp/go/" \ "swaggerapi/swagger-codegen-cli:${SWAGGER_CODEGEN_VERSION}" generate -i /tmp/gate/swagger.json -l go -o /tmp/go/
- Commit the changes and open a PR.