Skip to content

Commit 15d12bb

Browse files
committed
added jobs to convert if as field names to if_ for Base.dhall
1 parent be23f5a commit 15d12bb

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

buildkite/Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,26 @@ check_syntax:
44
# xargs will short-circuit if a command fails with code 255
55
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --file {} > /dev/null || exit 255'
66

7-
check_lint:
8-
@echo "Dhall version: $$(dhall --version)"
7+
convert_backticks_to_ifs:
8+
sed -i -E 's/`if` =/if =/g' src/Command/Base.dhall
9+
10+
convert_ifs_to_backticks:
11+
sed -i -E 's/if =/`if` =/g' src/Command/Base.dhall
12+
13+
check_lint: convert_backticks_to_ifs
914
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --ascii lint --check --inplace {} || exit 255'
1015

11-
check_format:
16+
check_format: convert_backticks_to_ifs
1217
@echo "Dhall version: $$(dhall --version)"
1318
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{} format" && dhall --ascii format --check --inplace {} || exit 255'
1419

1520
lint:
1621
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --ascii lint --inplace {} || exit 255'
22+
$(MAKE) convert_ifs_to_backticks
1723

1824
format:
1925
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --ascii format --inplace {} || exit 255'
26+
$(MAKE) convert_ifs_to_backticks
2027

2128
check_filter:
2229
# Ensure Jobs.dhall is generated before proceeding

0 commit comments

Comments
 (0)