-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
34 lines (25 loc) · 1.13 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
shell:
nix-shell --attr env shell.nix
release:
nix-build shell.nix
install:
nix-env -f shell.nix -i
hlint:
hlint ./app
hlint ./src
gen-aws-schema:
cd tf/aws && terraform init . && terraform providers schema -json . | jq > schema.json
gen-azure-schema:
cd tf/azurerm && terraform init . && terraform providers schema -json . | jq > schema.json
patch-aws-schema:
# Although it's not specified in the schema the aws provider also takes a version parameter.
# Without it, it defaults to the latest availalbe.
@echo "Adding the version field on the provider"
jq '.provider_schemas.aws.provider.block.attributes += {"version": { "type": "string", "optional": true, "description": "The desired version for the provider" } }' \
./tf/aws/schema.json > ./tf/aws/schema-patched.json
patch-azurerm-schema:
@echo "Adding the version field on the provider"
jq '.provider_schemas.azurerm.provider.block.attributes += {"version": { "type": "string", "optional": true, "description": "The desired version for the provider" } }' \
./tf/azurerm/schema.json > ./tf/azurerm/schema-patched.json
gen-nix:
cabal2nix --no-haddock --no-check . > default.nix