https://github.com/moul/rules.mk
Pre-defined rules to include in your Makefile (Golang, Docker, ...)
https://github.com/moul/rules.mk
docker golang makefile makefile-snippets
Last synced: 24 days ago
JSON representation
Pre-defined rules to include in your Makefile (Golang, Docker, ...)
- Host: GitHub
- URL: https://github.com/moul/rules.mk
- Owner: moul
- License: apache-2.0
- Created: 2019-08-29T08:39:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-16T01:43:41.000Z (6 months ago)
- Last Synced: 2025-03-30T11:33:23.646Z (about 2 months ago)
- Topics: docker, golang, makefile, makefile-snippets
- Language: Makefile
- Homepage: https://manfred.life/code
- Size: 1.06 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
- Authors: AUTHORS
Awesome Lists containing this project
README
# rules.mk
:smile: rules.mk
[](https://circleci.com/gh/moul/rules.mk)
[](https://github.com/moul/rules.mk/blob/master/LICENSE)
[](https://github.com/moul/rules.mk/releases)
[](https://www.codefactor.io/repository/github/moul/rules.mk)
[](https://manfred.life/)## Usage
### Install
1. Copy [`rules.mk`](./rules.mk) to your repo (`wget https://raw.githubusercontent.com/moul/rules.mk/master/rules.mk`)
2. Configure your project variables and import `rules.mk` from your Makefile
```makefile
GOPKG = moul.io/golang-repo-template # optional
GOBINS = . ./cmd/secondary-app # optional
DOCKER_IMAGE = moul/golang-repo-template # optional
NPM_PACKAGES = . # optionalinclude rules.mk # required
```
4. Profit#### Minimal config
```makefile
include rules.mk
```### Update
1. Run `make bumpdeps`
2. Profit### Examples
See the [`./test` directory](./test)
*`make help` at the root of this repo*
[embedmd]:# (.tmp/root-help.txt)
```txt
General commands:
bumpdeps
generate
test
```*`make help` in test/docker*
[embedmd]:# (.tmp/test-docker.txt)
```txt
General commands:
build
test
```*`make help` in test/go-binary*
[embedmd]:# (.tmp/test-go-binary.txt)
```txt
General commands:
build
bumpdeps
fmt
generate
install
lint
release
test
tidy
unittest
verify
```*`make help` in test/go-binary-and-docker*
[embedmd]:# (.tmp/test-go-binary-and-docker.txt)
```txt
General commands:
build
bumpdeps
fmt
generate
install
lint
release
test
tidy
unittest
verify
```*`make help` in test/go-library*
[embedmd]:# (.tmp/test-go-library.txt)
```txt
General commands:
build
bumpdeps
fmt
generate
lint
test
tidy
unittest
verify
```## License
© 2019-2020 [Manfred Touron](https://manfred.life) -
[Apache-2.0 License](https://github.com/moul/rules.mk/blob/master/LICENSE)