Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into applying-pr1218
Browse files Browse the repository at this point in the history
  • Loading branch information
meatballhat committed Apr 30, 2022
2 parents 1150c2e + 76418f2 commit 56837b0
Show file tree
Hide file tree
Showing 56 changed files with 1,655 additions and 703 deletions.
8 changes: 3 additions & 5 deletions .github/ISSUE_TEMPLATE/question.md
@@ -1,12 +1,10 @@
---
name: ask a question
about: ask us question - assume stackoverflow's guidelines apply here
title: 'q: ( your question title goes here )'
about: ask a question - assume stackoverflow's guidelines apply here
title: your question title goes here
labels: 'kind/question, status/triage, area/v2'
assignees: ''

---

## my question is...

_**( Put the question text here )**_
my question is...
39 changes: 25 additions & 14 deletions .github/ISSUE_TEMPLATE/v1-bug-report.md
@@ -1,28 +1,32 @@
---
name: v1 bug report
about: Create a report to help us fix v1 bugs
title: 'v1 bug: ( your bug title goes here )'
title: 'your bug title goes here'
labels: 'kind/bug, status/triage, area/v1'
assignees: ''

---

## my urfave/cli version is
## My urfave/cli version is

_**( Put the version of urfave/cli that you are using here )**_

## Checklist

* [ ] Are you running the latest v1 release? The list of releases is [here](https://github.com/urfave/cli/releases).
* [ ] Did you check the manual for your release? The v1 manual is [here](https://github.com/urfave/cli/blob/master/docs/v1/manual.md)
* [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.
- [ ] Are you running the latest v1 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [ ] Did you check the manual for your release? The v1 manual is [here](https://github.com/urfave/cli/blob/main/docs/v1/manual.md).
- [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.

## Dependency Management

- [ ] My project is using go modules.
- [ ] My project is using vendoring.
- [ ] My project is automatically downloading the latest version.
- [ ] I am unsure of what my dependency management setup is.
<!--
Delete any of the following that do not apply:
-->

- My project is using go modules.
- My project is using vendoring.
- My project is automatically downloading the latest version.
- I am unsure of what my dependency management setup is.

## Describe the bug

Expand All @@ -34,23 +38,30 @@ Describe the steps or code required to reproduce the behavior

## Observed behavior

What did you see happen immediately after the reproduction steps above?
What did you see happen immediately after the reproduction steps
above?

## Expected behavior

What would you have expected to happen immediately after the reproduction steps above?
What would you have expected to happen immediately after the
reproduction steps above?

## Additional context

Add any other context about the problem here.

If the issue relates to a specific open source Github repo, please link that repo here.
If the issue relates to a specific open source Github repo, please
link that repo here.

If you can reproduce this issue with a public CI system, please link a failing build here.
If you can reproduce this issue with a public CI system, please
link a failing build here.

## Want to fix this yourself?

We'd love to have more contributors on this project! If the fix for this bug is easily explained and very small, free free to create a pull request for it. You'll want to base the PR off the `v1` branch, all `v1` bug fix releases will be made from that branch.
We'd love to have more contributors on this project! If the fix for
this bug is easily explained and very small, free free to create a
pull request for it. You'll want to base the PR off the `v1`
branch, all `v1` bug fix releases will be made from that branch.

## Run `go version` and paste its output here

Expand Down
39 changes: 25 additions & 14 deletions .github/ISSUE_TEMPLATE/v2-bug-report.md
@@ -1,28 +1,32 @@
---
name: v2 bug report
about: Create a report to help us fix v2 bugs
title: 'v2 bug: ( your bug title goes here )'
title: 'your bug title goes here'
labels: 'kind/bug, area/v2, status/triage'
assignees: ''

---

## my urfave/cli version is
## My urfave/cli version is

_**( Put the version of urfave/cli that you are using here )**_

## Checklist

* [ ] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases).
* [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md)
* [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.
- [ ] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/main/docs/v2/manual.md)
- [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.

## Dependency Management

- [ ] My project is using go modules.
- [ ] My project is using vendoring.
- [ ] My project is automatically downloading the latest version.
- [ ] I am unsure of what my dependency management setup is.
<!--
Delete any of the following that do not apply:
-->

- My project is using go modules.
- My project is using vendoring.
- My project is automatically downloading the latest version.
- I am unsure of what my dependency management setup is.

## Describe the bug

Expand All @@ -34,23 +38,30 @@ Describe the steps or code required to reproduce the behavior

## Observed behavior

What did you see happen immediately after the reproduction steps above?
What did you see happen immediately after the reproduction steps
above?

## Expected behavior

What would you have expected to happen immediately after the reproduction steps above?
What would you have expected to happen immediately after the
reproduction steps above?

## Additional context

Add any other context about the problem here.

If the issue relates to a specific open source Github repo, please link that repo here.
If the issue relates to a specific open source Github repo, please
link that repo here.

If you can reproduce this issue with a public CI system, please link a failing build here.
If you can reproduce this issue with a public CI system, please
link a failing build here.

## Want to fix this yourself?

We'd love to have more contributors on this project! If the fix for this bug is easily explained and very small, free free to create a pull request for it.
We'd love to have more contributors on this project! If the fix for
this bug is easily explained and very small, free free to create a
pull request for it.

## Run `go version` and paste its output here

```
Expand Down
16 changes: 10 additions & 6 deletions .github/ISSUE_TEMPLATE/v2-feature-request.md
@@ -1,7 +1,7 @@
---
name: v2 feature request
about: Suggest an improvement for v2
title: 'v2 feature: ( your feature title goes here )'
title: 'your feature title goes here'
labels: 'type/feature, area/v2, status/triage'
assignees: ''

Expand All @@ -10,21 +10,25 @@ assignees: ''
## Checklist

* [ ] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases).
* [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md)
* [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/main/docs/v2/manual.md).
* [ ] Did you perform a search about this feature? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.

## What problem does this solve?

A clear and concise description of what problem this feature would solve. For example:

- needing to type out the full flag name takes a long time, so I would like to suggest adding auto-complete
- I use (osx, windows, linux) and would like support for (some existing feature) to be extended to my platform
- the terminal output for a particular error case is confusing, and I think it could be improved
- needing to type out the full flag name takes a long time, so I
would like to suggest adding auto-complete
- I use (osx, windows, linux) and would like support for (some
existing feature) to be extended to my platform
- the terminal output for a particular error case is confusing, and
I think it could be improved

## Solution description

A detailed description of what you want to happen.

## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.
A clear and concise description of any alternative solutions or
features you've considered.
13 changes: 9 additions & 4 deletions .github/pull_request_template.md
Expand Up @@ -8,10 +8,14 @@

_(REQUIRED)_

- [ ] bug
- [ ] cleanup
- [ ] documentation
- [ ] feature
<!--
Delete any of the following that do not apply:
-->

- bug
- cleanup
- documentation
- feature

## What this PR does / why we need it:

Expand All @@ -28,6 +32,7 @@ _(REQUIRED)_
## Which issue(s) this PR fixes:

_(REQUIRED)_

<!--
If this PR fixes one of more issues, list them here.
One line each, like so:
Expand Down
85 changes: 35 additions & 50 deletions .github/workflows/cli.yml
Expand Up @@ -3,56 +3,55 @@ name: Run Tests
on:
push:
branches:
- master
- v1
- main
tags:
- v2.*
pull_request:
branches:
- master
- v1
- main

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: [1.15, 1.16, 1.17]
go: [1.16.x, 1.17.x, 1.18.x]
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Set GOPATH, PATH and ENV
run: |
echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "GOPROXY=https://proxy.golang.org" >> $GITHUB_ENV
echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
shell: bash
- name: Set PATH
run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"

- name: Checkout Code
uses: actions/checkout@v1
with:
ref: ${{ github.ref }}
uses: actions/checkout@v3

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

- name: vet
run: go run internal/build/build.go vet

- name: test with tags
run: go run internal/build/build.go -tags urfave_cli_no_docs test

- name: test
run: go run internal/build/build.go test

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

- name: check-binary-size with tags (informational only)
run: go run internal/build/build.go -tags urfave_cli_no_docs check-binary-size || true

- name: Upload coverage to Codecov
if: success() && matrix.go == 1.17 && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v1
if: success() && matrix.go == '1.18.x' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true

Expand All @@ -61,44 +60,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
# Currently fails on 1.16+
go-version: 1.15
go-version: 1.18.x

- name: Use Node.js 12.x
uses: actions/setup-node@v1
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 12.x
node-version: '16'

- name: Set GOPATH, PATH and ENV
run: |
echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
echo "GO111MODULE=on" >> $GITHUB_ENV
echo "GOPROXY=https://proxy.golang.org" >> $GITHUB_ENV
echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
shell: bash
- name: Set PATH
run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"

- name: Checkout Code
uses: actions/checkout@v1
with:
ref: ${{ github.ref }}
uses: actions/checkout@v3

- name: Install Dependencies
run: |
mkdir -p $GOPATH/bin
curl -L -o $GOPATH/bin/gfmrun "https://github.com/urfave/gfmrun/releases/download/v1.2.14/gfmrun-$(go env GOOS)-amd64-v1.2.14"
chmod +x $GOPATH/bin/gfmrun
run:
mkdir -p "${GITHUB_WORKSPACE}/.local/bin" &&
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" &&
chmod +x "${GITHUB_WORKSPACE}/.local/bin/gfmrun" &&
npm install -g markdown-toc@1.2.0

- name: Run Tests (v1)
if: contains(github.base_ref, 'v1')
run: |
go run internal/build/build.go gfmrun docs/v1/manual.md
go run internal/build/build.go toc docs/v1/manual.md
- name: Run Tests (v2)
if: contains(github.base_ref, 'master')
run: |
go run internal/build/build.go gfmrun docs/v2/manual.md
go run internal/build/build.go toc docs/v2/manual.md
- name: gfmrun
run: go run internal/build/build.go gfmrun docs/v2/manual.md

- name: toc
run: go run internal/build/build.go toc docs/v2/manual.md
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,5 +5,6 @@ vendor
.idea
internal/*/built-example
coverage.txt
/.local/

*.exe
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 Jeremy Saenz & Contributors
Copyright (c) 2022 urfave/cli maintainers

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

0 comments on commit 56837b0

Please sign in to comment.