- Single command is mostly enough to prepare project, it will prompt you with some questions about your new project:
$ make -s prepare-initial-project
- If you want to build and publish Docker image:
- Ensure
DOCKER_USERNAME
has been added as repository secret on GitHub - Ensure
DOCKER_PASSWORD
has been added as repository secret on GitHub - Uncomment line 145 to line 152 in .github/workflows/push.yml
- Uncomment line 32 to line 50 in build/package/.goreleaser.yaml
- Ensure
- If you want to enable https://sonarcloud.io/ integration:
- Ensure your created repository from that template has been added to https://sonarcloud.io/
- Ensure
SONAR_TOKEN
has been added as repository secret on GitHub - Ensure
SONAR_TOKEN
has been added as dependabot secret on GitHub - Uncomment line 69 to line 94 in .github/workflows/pr.yml
- Uncomment line 116 in .github/workflows/push.yml
- Uncomment line 66 to line 91 in .github/workflows/push.yml
- If you want to create banner:
- Generate a banner from here and place it inside of build/ci directory into a file banner.txt
- Uncomment line 18 and line 35 to line 38 in cmd/root.go
- Run
go get -u github.com/dimiro1/banner
- If you want to release as Homebrew Formula:
- At first, you must have a formula repository like https://github.com/bilalcaliskan/homebrew-tap
- Create an access token on account that has formula repository mentioned above item and ensure that token is added as
TAP_GITHUB_TOKEN
repository secret on GitHub - Uncomment line 165 in .github/workflows/push.yml
- Uncomment line 70 to line 80 in build/package/.goreleaser.yaml
- If you want to mock your interfaces with mockery:
- Add
generate-mocks
target as a prerequisite to all uncommented targets starting withtest
in Makefile
- Add
This project requires below tools while developing:
- Golang 1.21
- pre-commit
- golangci-lint - required by pre-commit
- gocyclo - required by pre-commit
After you installed pre-commit, simply run below command to prepare your development environment:
$ make pre-commit-setup