-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
52 lines (41 loc) · 1.17 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
VERSION := v$(shell git describe --always)
DOCS_AWS_BUCKET := docs.skygear.io
DOCS_AWS_DISTRIBUTION := E31J8XF8IPV2V
DOCS_PREFIX = /ios/reference
GIT_REF_NAME := master
ifeq ($(VERSION),)
$(error VERSION is empty)
endif
.PHONY: vendor
vendor:
cd Example; pod install
.PHONY: release-commit
release-commit:
./scripts/release-commit.sh
.PHONY: update-version
update-version:
sed -i "" "s/\(s\.version[^=]*=[^\"]*\"\)[^\"]*/\1$(VERSION)/" SKYKit.podspec
sed -i "" "s/#define SKY_VERSION @\".*\"/#define SKY_VERSION @\"$(VERSION)\"/" Pod/Classes/SKYKit+version.h
.PHONY: doc
doc:
jazzy --github-file-prefix https://github.com/SkygearIO/skygear-SDK-iOS/tree/$(GIT_REF_NAME)
cp -rf .github docs/
.PHONY: doc-clean
doc-clean:
-rm docs
.PHONY: doc-upload
doc-upload:
aws s3 sync docs s3://$(DOCS_AWS_BUCKET)$(DOCS_PREFIX)/$(VERSION) --delete
.PHONY: doc-invalidate
doc-invalidate:
aws cloudfront create-invalidation --distribution-id $(DOCS_AWS_DISTRIBUTION) --paths "$(DOCS_PREFIX)/$(VERSION)/*"
.PHONY: doc-deploy
doc-deploy: doc-clean doc doc-upload doc-invalidate
.PHONY: format
format:
./clang-check.sh fix
swiftlint autocorrect
.PHONY: lint
lint:
./clang-check.sh
swiftlint lint