Skip to content

Commit

Permalink
feat: tools makefile (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhow09 authored May 4, 2024
1 parent 225f8dc commit 6a71190
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
TOOLS_SOURCE := $(wildcard ./tools/*.go)
tools:
@for file in $(TOOLS_SOURCE); do \
filename=$$(basename $$file .go); \
echo "generating tools $$filename"; \
go build -o ./tools/$$filename $$file; \
done
serve:
./tools/build && ./tools/serve
./tools/build && ./tools/serve

.PHONY: tools
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ learning resources: [resources](./resources.md)
details & internals: [docs](./docs)

## Develop Notes
### Setup
1. `make tools`
2. `make serve` to check if everything works fine

### Add Examples
1. create feature branch
2. add example to `examples.txt` `<title>|<folder-name>`
Expand All @@ -19,4 +23,4 @@ details & internals: [docs](./docs)
2. `./tools/serve`

## Credits
Template / Framework forked from [Go by Example](https://github.com/mmcgrana/gobyexample).
Template / Framework forked from [Go by Example](https://github.com/mmcgrana/gobyexample).

0 comments on commit 6a71190

Please sign in to comment.