Makefile to build a shard.yml file by merging others using yq:
make shards
=> basemake shards web=1
=> with kemalmake shards database=1
=> with mysqlmake shards web=1 database=1
=> with both
Makefile to build a shard.yml file by merging others using yq:
make shards
=> basemake shards web=1
=> with kemalmake shards database=1
=> with mysqlmake shards web=1 database=1
=> with bothname: test | |
version: 0.1.0 | |
authors: | |
- Evangelos Paterakis <evan@geopjr.dev> | |
targets: | |
test: | |
main: src/test.cr | |
crystal: 1.8.0 | |
license: MIT |
dependencies: | |
mysql: | |
github: crystal-lang/crystal-mysql |
dependencies: | |
kemal: | |
github: kemalcr/kemal |
web ?= 0 | |
database ?= 0 | |
shards: | |
cp base.yaml shard.yml | |
ifeq ($(web), 1) | |
yq -i '. *= load("features.web.yaml")' shard.yml | |
endif | |
ifeq ($(database), 1) | |
yq -i '. *= load("features.database.yaml")' shard.yml | |
endif |