forked from cucumber-attic/gherkin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (26 loc) · 1 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
MAKEFILES=$(wildcard */Makefile)
all: $(patsubst %/Makefile,%/.compared,$(MAKEFILES))
.PHONY: all
%/.compared: % gherkin-languages.json gherkin.berp
cd $< && make
clean: $(patsubst %/Makefile,clean-%,$(MAKEFILES))
.PHONY: clean
clean-%: %
cd $< && make clean
add-remotes: $(patsubst %/Makefile,add-remote-%,$(MAKEFILES))
.PHONY: add-remotes
add-remote-%: %
git remote -v | grep -E 'gherkin-$<\s' 2>/dev/null >/dev/null || \
git remote add gherkin-$< [email protected]:cucumber/gherkin-$<.git
push-subtrees: $(patsubst %/Makefile,push-subtree-%,$(MAKEFILES))
.PHONY: push-subtrees
push-subtree-%: % add-remote-%
git subtree push --prefix=$< gherkin-$< master
pull-subtrees: $(patsubst %/Makefile,pull-subtree-%,$(MAKEFILES))
.PHONY: pull-subtrees
pull-subtree-%: % add-remote-%
git subtree pull --prefix=$< gherkin-$< master
format-gherkin-languages:
cat gherkin-languages.json | jq "." --sort-keys > gherkin-languages.json.tmp
mv gherkin-languages.json.tmp gherkin-languages.json
.PHONY: format-gherkin-languages