-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
59 lines (47 loc) · 1.43 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
all: setup build test lint
.PHONY: setup
setup:
stack setup
stack build --dependencies-only --test --no-run-tests
stack install --copy-compiler-tool hlint weeder
.PHONY: build
build:
stack build --fast --pedantic --test --no-run-tests
.PHONY: test
test:
stack build --fast --pedantic --test
.PHONY: lint
lint:
stack exec hlint
stack exec weeder
.PHONY: clean
clean:
stack clean
.PHONY: check-nightly
check-nightly: STACK_ARGUMENTS=--stack-yaml stack-nightly.yaml --resolver nightly
check-nightly: setup build test
BCP47_VERSION = \
v$(shell sed '/^version: \(.*\)$$/!d; s//\1/' bcp47/package.yaml)
## Release and tag bcp47 at the version in package.yaml
.PHONY: release.bcp47
release.bcp47: RELEASE_PACKAGE=bcp47
release.bcp47: RELEASE_VERSION=$(BCP47_VERSION)
release.bcp47: release
BCP47_ORPHANS_VERSION = \
v$(shell sed '/^version: \(.*\)$$/!d; s//\1/' bcp47-orphans/package.yaml)
## Release and tag bcp47-orphans at the version in package.yaml
.PHONY: release.bcp47-orphans
release.bcp47-orphans: RELEASE_PACKAGE=bcp47-orphans
release.bcp47-orphans: RELEASE_VERSION=$(BCP47_ORPHANS_VERSION)
release.bcp47-orphans: release
RELEASE_PACKAGE ?=
RELEASE_VERSION ?=
## Release $(RELEASE_PACKAGE) at $(RELEASE_VERSION)
.PHONY: release
release:
[ -n "$(RELEASE_PACKAGE)" ]
[ -n "$(RELEASE_VERSION)" ]
git tag --sign --message \
"$(RELEASE_PACKAGE)-$(RELEASE_VERSION)" \
"$(RELEASE_PACKAGE)-$(RELEASE_VERSION)"
git push --follow-tags