Skip to content

Commit

Permalink
Move internal/cmd to internal/cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed May 25, 2021
1 parent 01c812b commit cf97df1
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:
with:
scandir: ./assets/scripts
- name: Whitespace
run: go run ./internal/cmd/lint-whitespace
run: go run ./internal/cmds/lint-whitespace
- name: Typos
run: |
go install github.com/twpayne/findtypos@latest
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ issues:
- linters:
- forbidigo
- gosec
path: ^internal/cmd/
path: ^internal/cmds/
- linters:
- gosec
path: "_test\\.go$"
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ completions:
$(GO) run . completion powershell -o completions/chezmoi.ps1
$(GO) run . completion zsh -o completions/chezmoi.zsh

assets/scripts/install.sh: internal/cmd/generate-install.sh/install.sh.tmpl internal/cmd/generate-install.sh/main.go
$(GO) run ./internal/cmd/generate-install.sh > $@
assets/scripts/install.sh: internal/cmds/generate-install.sh/install.sh.tmpl internal/cmds/generate-install.sh/main.go
$(GO) run ./internal/cmds/generate-install.sh > $@

.PHONY: lint
lint: ensure-golangci-lint
./bin/golangci-lint run
$(GO) run ./internal/cmd/lint-whitespace
$(GO) run ./internal/cmds/lint-whitespace

.PHONY: format
format: ensure-gofumports
Expand Down
48 changes: 24 additions & 24 deletions chezmoi.io/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,38 @@ content-docs: \
content/docs/related.md \
content/docs/templating.md

content/docs/architecture.md: ../docs/ARCHITECTURE.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="Architecture" -longtitle="Architecture" < $< > $@ || ( rm -f $@ ; false )
content/docs/architecture.md: ../docs/ARCHITECTURE.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Architecture" -longtitle="Architecture" < $< > $@ || ( rm -f $@ ; false )

content/docs/changes.md: ../docs/CHANGES.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="Changes" -longtitle="Changes" < $< > $@ || ( rm -f $@ ; false )
content/docs/changes.md: ../docs/CHANGES.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Changes" -longtitle="Changes" < $< > $@ || ( rm -f $@ ; false )

content/docs/comparison.md: ../docs/COMPARISON.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="Comparison" -longtitle="Comparison Guide" < $< > $@ || ( rm -f $@ ; false )
content/docs/comparison.md: ../docs/COMPARISON.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Comparison" -longtitle="Comparison Guide" < $< > $@ || ( rm -f $@ ; false )

content/docs/contributing.md: ../docs/CONTRIBUTING.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="Contributing" -longtitle="Contributing Guide" < $< > $@ || ( rm -f $@ ; false )
content/docs/contributing.md: ../docs/CONTRIBUTING.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Contributing" -longtitle="Contributing Guide" < $< > $@ || ( rm -f $@ ; false )

content/docs/faq.md: ../docs/FAQ.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="FAQ" -longtitle="Frequently Asked Questions" < $< > $@ || ( rm -f $@ ; false )
content/docs/faq.md: ../docs/FAQ.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="FAQ" -longtitle="Frequently Asked Questions" < $< > $@ || ( rm -f $@ ; false )

content/docs/how-to.md: ../docs/HOWTO.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="How-To" -longtitle="How-To Guide" < $< > $@ || ( rm -f $@ ; false )
content/docs/how-to.md: ../docs/HOWTO.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="How-To" -longtitle="How-To Guide" < $< > $@ || ( rm -f $@ ; false )

content/docs/install.md: ../docs/INSTALL.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="Install" -longtitle="Install Guide" < $< > $@ || ( rm -f $@ ; false )
content/docs/install.md: ../docs/INSTALL.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Install" -longtitle="Install Guide" < $< > $@ || ( rm -f $@ ; false )

content/docs/media.md: ../docs/MEDIA.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="Media" -longtitle="Media" < $< > $@ || ( rm -f $@ ; false )
content/docs/media.md: ../docs/MEDIA.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Media" -longtitle="Media" < $< > $@ || ( rm -f $@ ; false )

content/docs/quick-start.md: ../docs/QUICKSTART.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="Quick Start" -longtitle="Quick Start Guide" < $< > $@ || ( rm -f $@ ; false )
content/docs/quick-start.md: ../docs/QUICKSTART.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Quick Start" -longtitle="Quick Start Guide" < $< > $@ || ( rm -f $@ ; false )

content/docs/reference.md: ../docs/REFERENCE.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="Reference" -longtitle="Reference Manual" < $< > $@ || ( rm -f $@ ; false )
content/docs/reference.md: ../docs/REFERENCE.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Reference" -longtitle="Reference Manual" < $< > $@ || ( rm -f $@ ; false )

content/docs/related.md: ../docs/RELATED.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="Related" -longtitle="Related Software" < $< > $@ || ( rm -f $@ ; false )
content/docs/related.md: ../docs/RELATED.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Related" -longtitle="Related Software" < $< > $@ || ( rm -f $@ ; false )

content/docs/templating.md: ../docs/TEMPLATING.md ../internal/cmd/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmd/generate-chezmoi.io-content-docs -shorttitle="Templating" -longtitle="Templating Guide" < $< > $@ || ( rm -f $@ ; false )
content/docs/templating.md: ../docs/TEMPLATING.md ../internal/cmds/generate-chezmoi.io-content-docs/main.go Makefile
go run ../internal/cmds/generate-chezmoi.io-content-docs -shorttitle="Templating" -longtitle="Templating Guide" < $< > $@ || ( rm -f $@ ; false )
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func run() error {
})

// Generate install.sh.
installShTemplate, err := template.ParseFiles("internal/cmd/generate-install.sh/install.sh.tmpl")
installShTemplate, err := template.ParseFiles("internal/cmds/generate-install.sh/install.sh.tmpl")
if err != nil {
return err
}
Expand Down
File renamed without changes.

0 comments on commit cf97df1

Please sign in to comment.