Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Commit ebfd6e8

Browse files
committed
📖 Add CONTRIBUTING.md
Add `bin/bindl-dev` rule in Makefile to bootstrap with `go build`.
1 parent 840ba26 commit ebfd6e8

File tree

3 files changed

+46
-21
lines changed

3 files changed

+46
-21
lines changed

‎CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing
2+
3+
Thank you for your interest in Bindl. We welcome and encourage public contributions.
4+
5+
Prior to submitting code changes, we ask that you communicate the proposal and reach an agreement (typically in GitHub Issues) to help reviewers and increase the likelihood of accepting the changeset.
6+
7+
## Development environment
8+
9+
Ironically, as a project for dependency management, we have some dependencies which are not contained by `bindl.yaml`. While they are not _strictly necessary_, they are a convenient compromise. We are certainly open to alternatives. Until then, the project makes use of:
10+
11+
- **GNU Make** version 4.3
12+
- [**direnv**](https://direnv.net)
13+
14+
The good news is that other dependencies are listed in this project's own `bindl.yaml`. To set them up, start with bootstrapping Bindl.
15+
16+
### Bootstrapping Bindl
17+
18+
If you haven't already have Bindl in your `$PATH`, use one of the following methods:
19+
20+
- `make bin/bindl` to use latest release
21+
- `make bin/bindl-min` to compile from currently checked-out state
22+
23+
## Ensuring continuous integration
24+
25+
The project uses GitHub Actions to run continuous integration tasks. The CI pipeline invokes various Makefile rules to reduce development environment vs CI variability.
26+
27+
```bash
28+
# To run tests:
29+
make test/all
30+
# or look inside Makefile on which specific tests you'd like to run.
31+
32+
# To run linters:
33+
make lint
34+
# and to run auto-fixer:
35+
make lint/fix
36+
37+
# To make development builds:
38+
make bin/bindl-dev
39+
# This specifically invokes goreleaser to emulate builds on release
40+
```

‎Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ GO?=go
1515
bin/bindl:
1616
OUTDIR=bin ./bootstrap.sh
1717

18+
.PHONY: bin/bindl-min
19+
bin/bindl-min:
20+
${GO} build -o bin/bindl ./cmd/bindl
21+
1822
.PHONY: bin/bindl-dev
1923
bin/bindl-dev: bin/goreleaser
2024
bin/goreleaser build \

‎README.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,6 @@ You may try to install with `go get`, though versioning information may be incom
3131

3232
And of course, [assets in releases](https://github.com/bindl-dev/bindl/releases) are downloadable for manual binary installation.
3333

34-
## Developing Bindl
34+
## Contributing to Bindl
3535

36-
### Dependencies
37-
38-
To develop on Bindl, you may need to setup several programs:
39-
- GNU Make
40-
- [direnv](https://direnv.net/)
41-
42-
If your project relies on Bindl, the programs above are optional, but recommended as there are workflows which integrates well with them.
43-
44-
### Git hooks
45-
46-
If your project utilizes Bindl and Makefile, it is recommended to use [Git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks), specifically `post-checkout`:
47-
48-
49-
```sh
50-
touch .bindl-lock.yaml
51-
```
52-
53-
By running the line above every successful `git checkout`, your Make rules will forcibly rebuild binary dependencies the next time its invoked. Bindl will then validate if existing program is consistent with lockfile (i.e. `.bindl-lock.yaml`) and let user proceed if it is. Otherwise, Bindl will attempt to lookup locally and fallback to downloading the program.
54-
55-
This is particularly important when working with branches which has different versions of programs declared in `.bindl-lock.yaml`, because Bindl can enforce consistency with the current branch.
36+
Our guide on contributing to Bindl is specified in [`CONTRIBUTING.md`](CONTRIBUTING.md)

0 commit comments

Comments
 (0)