Skip to content

Commit 20f5589

Browse files
authored
Merge pull request #25 from controlplaneio/submodules-auto
refactor: setup make to autofetch submodules and update docs
2 parents 7a50dc5 + 239d9bc commit 20f5589

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,8 @@ We also have an issue template for questions [here](https://github.com/controlpl
4747

4848
## What Should I Know Before I Get Started?
4949

50-
**If you want to run the acceptance tests** make sure to clone with `-recurse-submodules` or if you've already cloned the
51-
repo you can fetch the submodules with:
52-
53-
```sh
54-
git submodule init
55-
git submodule update
56-
```
50+
The acceptance tests require some dependencies fetched via submodules. You can either clone the repo with `--recurse-submodules`
51+
or when running `make test`/`make test-acceptance` it will automatically fetch them if they're missing.
5752

5853
## How Can I Contribute?
5954

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,14 @@ test: ## unit and local acceptance tests
8383
@echo "+ $@"
8484
make test-unit build test-acceptance
8585

86+
test/bin/%:
87+
git submodule update --init -- $@
88+
89+
.PHONY: bats
90+
bats: test/bin/bats test/bin/bats-assert test/bin/bats-support ## fetch bats dependencies
91+
8692
.PHONY: test-acceptance
87-
test-acceptance: ## acceptance tests
93+
test-acceptance: bats build ## acceptance tests
8894
@echo "+ $@"
8995
bash -xc 'cd test && ./bin/bats/bin/bats $(BATS_PARALLEL_JOBS) .'
9096

0 commit comments

Comments
 (0)