-
-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove tools.go hack from documentation
- Loading branch information
Showing
1 changed file
with
2 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,19 +53,17 @@ You should now be able to run `ginkgo version` at the command line and see the G | |
To upgrade Ginkgo run: | ||
|
||
```bash | ||
go get github.com/onsi/ginkgo/v2/ginkgo | ||
go get github.com/onsi/ginkgo/v2 | ||
go install github.com/onsi/ginkgo/v2/ginkgo | ||
``` | ||
|
||
To pick a particular version: | ||
|
||
```bash | ||
go get github.com/onsi/ginkgo/v2/ginkgo@v2.m.p | ||
go get github.com/onsi/ginkgo/[email protected] | ||
go install github.com/onsi/ginkgo/v2/ginkgo | ||
``` | ||
|
||
Note that in both cases we `go get` the `/v2/ginkgo` subpackage. This pulls in the CLI and its dependencies. If you only `go get github.com/onsi/ginkgo/v2` you may experience issues installing the cli - if you do simply run `go get github.com/onsi/ginkgo/v2/ginkgo` to fetch the missing dependencies. | ||
|
||
### Support Policy | ||
|
||
Ginkgo adheres to semantic versioning - the intent is for there to be no breaking changes along the `2.m.p` line with new functionality landing as minor releases and bug-fixes landing as patch releases (fixes are never back-ported). We work hard to maintain this policy however exceptions (while rare and typically minor) are possible, especially for brand new/emerging features. | ||
|
@@ -3510,21 +3508,6 @@ When running in CI you must make sure that the version of the `ginkgo` CLI you a | |
|
||
`go run github.com/onsi/ginkgo/v2/ginkgo` | ||
|
||
This alone, however, is often not enough. The Ginkgo CLI includes additional dependencies that aren't part of the Ginkgo library - since your code doesn't import the cli these dependencies probably aren't in your `go.sum` file. To get around this it is idiomatic Go to introduce a `tools.go` file. This can go anywhere in your module - for example, Gomega places its `tools.go` at the top-level. Your `tools.go` file should look like: | ||
|
||
```go | ||
//go:build tools | ||
// +build tools | ||
|
||
package main | ||
|
||
import ( | ||
_ "github.com/onsi/ginkgo/v2/ginkgo" | ||
) | ||
``` | ||
|
||
The `//go:build tools` constraint ensures this code is never actually built, however the `_ "github.com/onsi/ginkgo/v2/ginkgo` import statement is enough to convince `go mod` to include the Ginkgo CLI dependencies in your `go.sum` file. | ||
|
||
Once you have `ginkgo` running on CI, you'll want to pick and choose the optimal set of flags for your test runs. We recommend the following set of flags when running in a continuous integration environment: | ||
|
||
```bash | ||
|