Skip to content

Commit 468a474

Browse files
committed
Better make help
1 parent 94f0102 commit 468a474

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
.viminfo
66
digest
77
diffyscan-params.json
8+
.DS_Store

Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ DIFFYSCAN_PARAMS_FILE = diffyscan-params.json
1212
# TARGETS
1313

1414
.PHONY: help
15-
help:
15+
help: ## Display the current message
1616
@echo "Available targets:"
17-
@grep -E '^[a-zA-Z0-9_-]*:.*?## .*$$' Makefile \
18-
| sed -n 's/^\(.*\): \(.*\)##\(.*\)/- make \1 \3/p' \
19-
| sed 's/^- make $$//g'
17+
@cat Makefile | while IFS= read -r line; do \
18+
if [[ "$$line" == "##" ]]; then \
19+
echo "" ; \
20+
elif [[ "$$line" =~ ^([^:]+):(.*)##\ (.*)$$ ]]; then \
21+
echo -e "- make $${BASH_REMATCH[1]} \t$${BASH_REMATCH[3]}" ; \
22+
fi ; \
23+
done
2024
@for dep in $(AVAILABLE_DEPLOYMENTS); do echo -e "- make $$dep\t Verify using deployments/$$dep.json"; done
2125

22-
: ##
26+
##
2327

2428
.PHONY: init
2529
init: .env ## Check the dependencies and prepare the Docker image
@@ -54,7 +58,7 @@ diff-summary: ## Show the detected mismatches on the latest run under ./diges
5458
echo -n "Do you want to open them? (y/N) " ; read cont ; \
5559
[ "$$cont" == "y" ] && open $$diffs || true
5660

57-
: ##
61+
##
5862

5963
# Generate dynamic rules for each supported deployment:
6064

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ Ensure that you have `make` installed on your system:
1111
```sh
1212
$ make
1313
Available targets:
14+
- make help Display the current message
1415

15-
- make init Check the dependencies and prepare the Docker image
16-
- make clean Clean the generated artifacts
17-
- make diff-summary Show the detected mismatches on the latest run under ./digest
16+
- make init Check the dependencies and prepare the Docker image
17+
- make clean Clean the generated artifacts
18+
- make diff-summary Show the detected mismatches on the latest run under ./digest
1819

19-
- make osx-sepolia Verify using deployments/osx-sepolia.json
20-
- make admin-sepolia Verify using deployments/admin-sepolia.json
21-
- make multisig-sepolia Verify using deployments/multisig-sepolia.json
22-
- make spp-sepolia Verify using deployments/spp-sepolia.json
23-
- make token-voting-sepolia Verify using deployments/token-voting-sepolia.json
20+
- make osx-sepolia Verify using deployments/osx-sepolia.json
21+
- make admin-sepolia Verify using deployments/admin-sepolia.json
22+
- make multisig-sepolia Verify using deployments/multisig-sepolia.json
23+
- make spp-sepolia Verify using deployments/spp-sepolia.json
24+
- make token-voting-sepolia Verify using deployments/token-voting-sepolia.json
2425
```
2526

2627
### Initialization

0 commit comments

Comments
 (0)