|
|
5 роки тому | |
|---|---|---|
| .dependabot | 5 роки тому | |
| .github | 5 роки тому | |
| azure | 5 роки тому | |
| backend | 5 роки тому | |
| cli | 5 роки тому | |
| client | 5 роки тому | |
| compose | 5 роки тому | |
| config | 5 роки тому | |
| containers | 5 роки тому | |
| context | 5 роки тому | |
| docs | 5 роки тому | |
| errdefs | 5 роки тому | |
| example | 5 роки тому | |
| formatter | 5 роки тому | |
| local | 5 роки тому | |
| metrics | 5 роки тому | |
| multierror | 5 роки тому | |
| progress | 5 роки тому | |
| protos | 5 роки тому | |
| server | 5 роки тому | |
| tests | 5 роки тому | |
| .dockerignore | 5 роки тому | |
| .gitattributes | 5 роки тому | |
| .gitignore | 5 роки тому | |
| .golangci.yml | 5 роки тому | |
| CHANGELOG.md | 5 роки тому | |
| Dockerfile | 5 роки тому | |
| Makefile | 5 роки тому | |
| README.md | 5 роки тому | |
| builder.Makefile | 5 роки тому | |
| go.mod | 5 роки тому | |
| go.sum | 5 роки тому |
The recommended way is to use the main Makefile that runs everything inside a container.
If you don't have or want to use Docker for building you need to make sure you have all the needed tools installed locally:
go get github.com/golang/protobuf/[email protected]go get golang.org/x/tools/cmd/goimportsgo get github.com/golangci/golangci-lint/cmd/[email protected]And then you can call the same make targets but you need to pass it the builder.Makefile (make -f builder.Makefile).
The new CLI delegates to the classic docker for default contexts ; delegation is done to com.docker.cli.
make moby-cli-link will create a com.docker.cli link in /usr/local/bin if you don't already have it from Docker Desktop$ make
This will make the cli with all backends enabled. make cross on the other hand will cross-compile the cli without the
example and local backend. We use make cross to build for our release, hence the exclusion of those backends. You can
still cross-compile with all backends enabled: BUILD_TAGS=example,local make cross.
If you make changes to the .proto files, make sure to make protos to generate go code.
To run unit tests:
make test
If you need to update a golden file simply do go test ./... -test.update-golden.