Skip to content

Commit a82c9b1

Browse files
committed
Merge remote-tracking branch 'origin/main' into merging-main-to-v3-dev-main
2 parents 71dbc63 + 8d46d37 commit a82c9b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+12240
-2484
lines changed

.github/stale.yml

-17
This file was deleted.

.github/workflows/cli.yml

+38-9
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,26 @@ jobs:
3434
uses: actions/checkout@v3
3535

3636
- name: GOFMT Check
37-
if: matrix.go == '1.17.x' && matrix.os == 'ubuntu-latest'
37+
if: matrix.go == '1.18.x' && matrix.os == 'ubuntu-latest'
3838
run: test -z $(gofmt -l .)
3939

4040
- name: vet
4141
run: go run internal/build/build.go vet
4242

43+
- name: test with urfave_cli_no_docs tag
44+
run: go run internal/build/build.go -tags urfave_cli_no_docs test
45+
4346
- name: test
4447
run: go run internal/build/build.go test
4548

4649
- name: check-binary-size
4750
run: go run internal/build/build.go check-binary-size
4851

52+
- name: check-binary-size with tags (informational only)
53+
run: go run internal/build/build.go -tags urfave_cli_no_docs check-binary-size
54+
4955
- name: Upload coverage to Codecov
50-
if: success() && matrix.go == '1.17.x' && matrix.os == 'ubuntu-latest'
56+
if: success() && matrix.go == '1.18.x' && matrix.os == 'ubuntu-latest'
5157
uses: codecov/codecov-action@v2
5258
with:
5359
fail_ci_if_error: true
@@ -73,14 +79,37 @@ jobs:
7379
uses: actions/checkout@v3
7480

7581
- name: Install Dependencies
76-
run:
77-
mkdir -p "${GITHUB_WORKSPACE}/.local/bin" &&
78-
curl -fsSL -o "${GITHUB_WORKSPACE}/.local/bin/gfmrun" "https://github.com/urfave/gfmrun/releases/download/v1.3.0/gfmrun-$(go env GOOS)-$(go env GOARCH)-v1.3.0" &&
79-
chmod +x "${GITHUB_WORKSPACE}/.local/bin/gfmrun" &&
80-
npm install -g [email protected]
82+
run: |
83+
mkdir -p "${GITHUB_WORKSPACE}/.local/bin"
84+
curl -fsSL -o "${GITHUB_WORKSPACE}/.local/bin/gfmrun" "https://github.com/urfave/gfmrun/releases/download/v1.3.0/gfmrun-$(go env GOOS)-$(go env GOARCH)-v1.3.0"
85+
chmod +x "${GITHUB_WORKSPACE}/.local/bin/gfmrun"
8186
8287
- name: gfmrun
8388
run: go run internal/build/build.go gfmrun docs/v2/manual.md
8489

85-
- name: toc
86-
run: go run internal/build/build.go toc docs/v2/manual.md
90+
- name: diff check
91+
run: |
92+
git diff --exit-code
93+
git diff --cached --exit-code
94+
95+
publish:
96+
if: startswith(github.ref, 'refs/tags/')
97+
name: publish
98+
needs: [test-docs]
99+
runs-on: ubuntu-latest
100+
steps:
101+
- name: Checkout Code
102+
uses: actions/checkout@v3
103+
with:
104+
fetch-depth: 0
105+
106+
- name: Setup mkdocs
107+
run: |
108+
pip install -U pip
109+
pip install -r mkdocs-requirements.txt
110+
git remote rm origin
111+
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/urfave/cli.git
112+
113+
- name: Publish Docs
114+
run: |
115+
mkdocs gh-deploy --force

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
*.coverprofile
22
*.orig
3-
node_modules/
43
vendor
54
.idea
65
internal/*/built-example
76
coverage.txt
87
/.local/
8+
/site/
99

1010
*.exe

CODE_OF_CONDUCT.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting Dan Buch at [email protected]. All complaints will be
59-
reviewed and investigated and will result in a response that is deemed necessary
60-
and appropriate to the circumstances. The project team is obligated to maintain
61-
confidentiality with regard to the reporter of an incident. Further details of
62-
specific enforcement policies may be posted separately.
58+
reported by contacting [email protected], a members-only group
59+
that is world-postable. All complaints will be reviewed and investigated and
60+
will result in a response that is deemed necessary and appropriate to the
61+
circumstances. The project team is obligated to maintain confidentiality with
62+
regard to the reporter of an incident. Further details of specific enforcement
63+
policies may be posted separately.
6364

6465
Project maintainers who do not follow or enforce the Code of Conduct in good
6566
faith may face temporary or permanent repercussions as determined by other

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 Jeremy Saenz & Contributors
3+
Copyright (c) 2022 urfave/cli maintainers
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# NOTE: this Makefile is meant to provide a simplified entry point for humans to
2+
# run all of the critical steps to verify one's changes are harmonious in
3+
# nature. Keeping target bodies to one line each and abstaining from make magic
4+
# are very important so that maintainers and contributors can focus their
5+
# attention on files that are primarily Go.
6+
7+
.PHONY: all
8+
all: generate vet tag-test test check-binary-size tag-check-binary-size gfmrun v2diff
9+
10+
# NOTE: this is a special catch-all rule to run any of the commands
11+
# defined in internal/build/build.go with optional arguments passed
12+
# via GFLAGS (global flags) and FLAGS (command-specific flags), e.g.:
13+
#
14+
# $ make test GFLAGS='--packages cli'
15+
%:
16+
go run internal/build/build.go $(GFLAGS) $* $(FLAGS)
17+
18+
.PHONY: tag-test
19+
tag-test:
20+
go run internal/build/build.go -tags urfave_cli_no_docs test
21+
22+
.PHONY: tag-check-binary-size
23+
tag-check-binary-size:
24+
go run internal/build/build.go -tags urfave_cli_no_docs check-binary-size
25+
26+
.PHONY: gfmrun
27+
gfmrun:
28+
go run internal/build/build.go gfmrun docs/v2/manual.md
29+
30+
.PHONY: docs
31+
docs:
32+
mkdocs build
33+
34+
.PHONY: docs-deps
35+
docs-deps:
36+
pip install -r mkdocs-requirements.txt
37+
38+
.PHONY: serve-docs
39+
serve-docs:
40+
mkdocs serve

README.md

+6-57
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
cli
2-
===
1+
# cli
32

43
[![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://pkg.go.dev/github.com/urfave/cli/v2)
54
[![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/gb.xjqchip.workers.dev-urfave-cli)
@@ -10,61 +9,11 @@ cli is a simple, fast, and fun package for building command line apps in Go. The
109
goal is to enable developers to write fast and distributable command line
1110
applications in an expressive way.
1211

13-
## Usage Documentation
12+
## Documentation
1413

15-
Usage documentation exists for each major version. Don't know what version you're on? You're probably using the version from the `main` branch, which is currently `v2`.
14+
More documentation is available in [`./docs`](./docs) or the hosted
15+
documentation site at <https://cli.urfave.org>.
1616

17-
- `v2` - [./docs/v2/manual.md](./docs/v2/manual.md)
18-
- `v1` - [./docs/v1/manual.md](./docs/v1/manual.md)
17+
## License
1918

20-
Guides for migrating to newer versions:
21-
22-
- `v1-to-v2` - [./docs/migrate-v1-to-v2.md](./docs/migrate-v1-to-v2.md)
23-
24-
## Installation
25-
26-
Using this package requires a working Go environment. [See the install instructions for Go](http://golang.org/doc/install.html).
27-
28-
Go Modules are required when using this package. [See the go blog guide on using Go Modules](https://blog.golang.org/using-go-modules).
29-
30-
### Using `v2` releases
31-
32-
```
33-
$ go get github.com/urfave/cli/v2
34-
```
35-
36-
```go
37-
...
38-
import (
39-
"github.com/urfave/cli/v2" // imports as package "cli"
40-
)
41-
...
42-
```
43-
44-
### Using `v1` releases
45-
46-
```
47-
$ go get github.com/urfave/cli
48-
```
49-
50-
```go
51-
...
52-
import (
53-
"github.com/urfave/cli"
54-
)
55-
...
56-
```
57-
58-
### GOPATH
59-
60-
Make sure your `PATH` includes the `$GOPATH/bin` directory so your commands can
61-
be easily used:
62-
```
63-
export PATH=$PATH:$GOPATH/bin
64-
```
65-
66-
### Supported platforms
67-
68-
cli is tested against multiple versions of Go on Linux, and against the latest
69-
released version of Go on OS X and Windows. This project uses Github Actions for
70-
builds. To see our currently supported go versions and platforms, look at the [./.github/workflows/cli.yml](https://github.com/urfave/cli/blob/main/.github/workflows/cli.yml).
19+
See [`LICENSE`](./LICENSE)

0 commit comments

Comments
 (0)