diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
new file mode 100644
index 0000000..82eab4f
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -0,0 +1,58 @@
+name: Bug
+description: File a bug/issue
+title: "
"
+labels: [bug]
+body:
+- type: textarea
+ attributes:
+ label: Current Behavior
+ description: A concise description of what you're experiencing.
+ validations:
+ required: false
+- type: textarea
+ attributes:
+ label: Expected Behavior
+ description: A concise description of what you expected to happen.
+ validations:
+ required: false
+- type: textarea
+ attributes:
+ label: Steps To Reproduce
+ description: Steps to reproduce the behavior.
+ placeholder: |
+ 1. In this environment...
+ 2. With this config...
+ 3. Run '...'
+ 4. See error...
+ validations:
+ required: false
+- type: checkboxes
+ attributes:
+ label: OS
+ description: Operating System where this occured.
+ options:
+ - label: Linux
+ - label: OSX
+ - label: Windows
+- type: checkboxes
+ attributes:
+ label: Shell
+ description: Shell where this occured.
+ options:
+ - label: Bash
+ - label: Elvish
+ - label: Fish
+ - label: Nushell
+ - label: Oil
+ - label: Powershell
+ - label: Xonsh
+ - label: Zsh
+- type: textarea
+ attributes:
+ label: Anything else?
+ description: |
+ Links? References? Anything that will give us more context about the issue you are encountering!
+
+ Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/request.yaml b/.github/ISSUE_TEMPLATE/request.yaml
new file mode 100644
index 0000000..dca98fd
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/request.yaml
@@ -0,0 +1,26 @@
+name: Request
+description: Submit a request
+title: ""
+labels: [enhancement]
+body:
+- type: textarea
+ attributes:
+ label: Request
+ description: Describe the feature or problem you’d like to solve.
+ validations:
+ required: false
+- type: textarea
+ attributes:
+ label: Proposed solution
+ description: How will it benefit the project and its users.
+ validations:
+ required: false
+- type: textarea
+ attributes:
+ label: Anything else?
+ description: |
+ Links? References? Anything that will give us more context about the request!
+
+ Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
+ validations:
+ required: false
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..f570027
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,11 @@
+version: 2
+updates:
+ - package-ecosystem: "gomod"
+ directory: "/"
+ schedule:
+ interval: "daily"
+
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "daily"
\ No newline at end of file
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
new file mode 100644
index 0000000..761a321
--- /dev/null
+++ b/.github/workflows/go.yml
@@ -0,0 +1,51 @@
+name: Go
+
+on:
+ pull_request:
+ push:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: shallow clone
+ uses: actions/checkout@v4
+ if: "!startsWith(github.ref, 'refs/tags/')"
+
+ - name: deep clone
+ uses: actions/checkout@v4
+ if: startsWith(github.ref, 'refs/tags/')
+ with:
+ fetch-depth: 0
+
+ - name: Set up Go
+ uses: actions/setup-go@v4
+ with:
+ go-version: '1.21'
+
+ - name: Build
+ run: go build -v ./...
+
+ - name: Test
+ run: go test -v -coverprofile=profile.cov ./...
+
+ - name: "Check formatting"
+ run: '[ "$(gofmt -d -s . | tee -a /dev/stderr)" = "" ]'
+
+ - uses: shogo82148/actions-goveralls@v1
+ with:
+ path-to-profile: profile.cov
+
+ - name: "staticcheck"
+ run: go install honnef.co/go/tools/cmd/staticcheck@latest && staticcheck ./...
+
+ - name: Run GoReleaser
+ uses: goreleaser/goreleaser-action@v5
+ if: startsWith(github.ref, 'refs/tags/')
+ with:
+ version: latest
+ args: release --rm-dist
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ AUR_KEY: ${{ secrets.AUR_KEY }}
+ GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..eb89d6b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+cmd/carapace-spec-man/carapace-spec-man
+dist
+docs/book
+go.work
+go.work.sum
+profile.cov
diff --git a/.goreleaser.yml b/.goreleaser.yml
new file mode 100644
index 0000000..159532f
--- /dev/null
+++ b/.goreleaser.yml
@@ -0,0 +1,69 @@
+before:
+ hooks:
+ - go mod download
+builds:
+ - env:
+ - CGO_ENABLED=0
+ goos:
+ - linux
+ - windows
+ - darwin
+ main: ./cmd/carapace-spec-man
+ binary: carapace-spec-man
+ tags:
+ - release
+archives:
+ - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
+ format_overrides:
+ - goos: windows
+ format: zip
+checksum:
+ name_template: 'checksums.txt'
+snapshot:
+ name_template: "{{ .Tag }}-next"
+changelog:
+ sort: asc
+ filters:
+ exclude:
+ - '^docs:'
+ - '^test:'
+brews:
+ -
+ description: "generate spec from manpages"
+ homepage: "https://github.com/rsteube/carapace-spec"
+ license: "MIT"
+ tap:
+ owner: rsteube
+ name: homebrew-tap
+ token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}"
+ commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
+scoop:
+ description: "generate spec from manpages"
+ homepage: "https://github.com/rsteube/carapace-spec"
+ license: "MIT"
+ bucket:
+ owner: rsteube
+ name: scoop-bucket
+ token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}"
+ commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
+
+aurs:
+ -
+ description: "generate spec from manpages"
+ homepage: "https://github.com/rsteube/carapace-spec"
+ license: "MIT"
+ maintainers:
+ - rsteube
+ private_key: '{{ .Env.AUR_KEY }}'
+ git_url: 'ssh://aur@aur.archlinux.org/carapace-spec-bin.git'
+
+nfpms:
+ -
+ description: "generate spec from manpages"
+ homepage: "https://github.com/rsteube/carapace-spec"
+ license: "MIT"
+ maintainer: rsteube
+ formats:
+ - apk
+ - deb
+ - rpm
diff --git a/go.mod b/go.mod
index a514eac..2f97042 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/rsteube/carapace-spec-man
-go 1.21.2
+go 1.21
require (
github.com/lmorg/murex v0.0.0-20231013090319-c15107051f5b