Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: urfave/cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.7.0
Choose a base ref
...
head repository: urfave/cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.7.1
Choose a head ref
  • 8 commits
  • 5 files changed
  • 1 contributor

Commits on May 19, 2022

  1. Verified

    This commit was signed with the committer’s verified signature.
    crazy-max CrazyMax
    Copy the full SHA
    061250a View commit details
  2. Copy the full SHA
    522b7e0 View commit details
  3. Copy the full SHA
    70e1ed4 View commit details
  4. Copy the full SHA
    5988cc6 View commit details
  5. Copy the full SHA
    e592640 View commit details
  6. Copy the full SHA
    e7f3925 View commit details
  7. Copy the full SHA
    b3359c3 View commit details
  8. Merge pull request #1400 from urfave/docs-publish-debugging

    Docs publishing fixes
    meatballhat authored May 19, 2022
    Copy the full SHA
    5c1c2ea View commit details
Showing with 21 additions and 33 deletions.
  1. +16 −12 .github/workflows/cli.yml
  2. +1 −5 Makefile
  3. +0 −13 internal/build/build.go
  4. +3 −2 mkdocs-requirements.txt
  5. +1 −1 mkdocs.yml
28 changes: 16 additions & 12 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -76,18 +76,14 @@ jobs:
uses: actions/checkout@v3

- name: Install Dependencies
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
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"
- 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

- name: diff check
run: |
git diff --exit-code
@@ -96,13 +92,21 @@ jobs:
publish:
if: startswith(github.ref, 'refs/tags/')
name: publish
needs: [test-docs]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup mkdocs
run: |
pip install -U pip
pip install -r mkdocs-requirements.txt
git remote rm origin
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/urfave/cli.git
- name: Publish Docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.MKDOCS_PUBLISH_GITHUB_TOKEN }}
REQUIREMENTS: mkdocs-requirements.txt
run: |
mkdocs gh-deploy --force
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
# attention on files that are primarily Go.

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

# NOTE: this is a special catch-all rule to run any of the commands
# defined in internal/build/build.go with optional arguments passed
@@ -27,10 +27,6 @@ tag-check-binary-size:
gfmrun:
go run internal/build/build.go gfmrun docs/v2/manual.md

.PHONY: toc
toc:
go run internal/build/build.go toc docs/v2/manual.md

.PHONY: docs
docs:
mkdocs build
13 changes: 0 additions & 13 deletions internal/build/build.go
Original file line number Diff line number Diff line change
@@ -63,10 +63,6 @@ func main() {
Name: "gfmrun",
Action: GfmrunActionFunc,
},
{
Name: "toc",
Action: TocActionFunc,
},
{
Name: "check-binary-size",
Action: checkBinarySizeActionFunc,
@@ -216,15 +212,6 @@ func GfmrunActionFunc(c *cli.Context) error {
return runCmd("gfmrun", "-c", fmt.Sprint(counter), "-s", filename)
}

func TocActionFunc(c *cli.Context) error {
filename := c.Args().Get(0)
if filename == "" {
filename = "README.md"
}

return runCmd("markdown-toc", "-i", filename)
}

// checkBinarySizeActionFunc checks the size of an example binary to ensure that we are keeping size down
// this was originally inspired by https://github.com/urfave/cli/issues/1055, and followed up on as a part
// of https://github.com/urfave/cli/issues/1057
5 changes: 3 additions & 2 deletions mkdocs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mkdocs~=1.3
mkdocs-material~=8.2
mkdocs-git-revision-date-localized-plugin~=1.0
mkdocs-material-extensions~=1.0
mkdocs-material~=8.2
mkdocs~=1.3
pygments~=2.12
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

site_name: urfave/cli
site_url: https://cli.urfave.org/
repo_url: https://github.com/urvafe/cli
repo_url: https://github.com/urfave/cli
edit_uri: edit/main/docs/
nav:
- Home: index.md