Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a v2.x semver approval gate #1385

Merged
merged 4 commits into from May 7, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 10 additions & 18 deletions Makefile
Expand Up @@ -5,30 +5,22 @@
# attention on files that are primarily Go.

.PHONY: all
all: generate lint tag-test test check-bin tag-check-bin gfmrun toc
all: generate vet tag-test test check-binary-size tag-check-binary-size gfmrun toc v2diff

.PHONY: generate
generate:
go run internal/build/build.go generate

.PHONY: lint
lint:
go run internal/build/build.go vet
# NOTE: this is a special catch-all rule to run any of the commands
# defined in internal/build/build.go with optional arguments passed
# via GFLAGS (global flags) and FLAGS (command-specific flags), e.g.:
#
# $ make test GFLAGS='--packages cli'
%:
go run internal/build/build.go $(GFLAGS) $* $(FLAGS)

.PHONY: tag-test
tag-test:
go run internal/build/build.go -tags urfave_cli_no_docs test

.PHONY: test
test:
go run internal/build/build.go test

.PHONY: check-bin
check-bin:
go run internal/build/build.go check-binary-size

.PHONY: tag-check-bin
tag-check-bin:
.PHONY: tag-check-binary-size
tag-check-binary-size:
go run internal/build/build.go -tags urfave_cli_no_docs check-binary-size

.PHONY: gfmrun
Expand Down
23 changes: 21 additions & 2 deletions docs/CONTRIBUTING.md
Expand Up @@ -12,8 +12,9 @@ not get a response for many days.

### semantic versioning adherence

The `urfave/cli` project strives to strictly adhere to semantic versioning. The active
development branches and the milestones and import paths to which they correspond are:
The `urfave/cli` project strives to strictly adhere to [semantic
versioning](https://semver.org/spec/v2.0.0.html). The active development branches and the
milestones and import paths to which they correspond are:

#### `main` branch

Expand All @@ -25,6 +26,10 @@ which **MUST** *only* receive bug fixes and feature *additions*.
- :arrow_right: [`v2.x`](https://github.com/urfave/cli/milestone/16)
- :arrow_right: `github.com/urfave/cli/v2`

The `main` branch in particular includes tooling to help with keeping the `v2.x` series
backward compatible. More details on this process are in the development workflow section
below.

#### `v1` branch

<https://github.com/urfave/cli/tree/v1>
Expand Down Expand Up @@ -63,6 +68,20 @@ verify one's changes are harmonious in nature. The same steps are also run durin
[continuous integration
phase](https://github.com/urfave/cli/blob/main/.github/workflows/cli.yml).

In the event that the `v2diff` target exits non-zero, this is a signal that the public API
surface area has changed. If the changes adhere to semantic versioning, meaning they are
*additions* or *bug fixes*, then manually running the approval step will "promote" the
current `go doc` output:

```sh
make v2approve
```

Because the `generate` step includes updating `godoc-current.txt` and
`testdata/godoc-v2.x.txt`, these changes *MUST* be part of any proposed pull request so
that reviewers have an opportunity to also make an informed decision about the "promotion"
step.

#### generated code

A significant portion of the project's source code is generated, with the goal being to
Expand Down