-
-
Notifications
You must be signed in to change notification settings - Fork 66
/
Makefile
58 lines (46 loc) · 1.64 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
default: test
test: unit-test ui-test
unit-test:
bundle exec fastlane ios unit_tests
bundle exec fastlane tvos unit_tests
ui-test:
bundle exec fastlane ios ui_tests
bundle exec fastlane tvos ui_tests
ci-test: unit-test ui-test
make -B carthage
make -B docs
swift-package-project:
rm -rf Package/Package.xcproj
mint run yonaskolb/XcodeGen xcodegen generate --project Package --spec Package/Package.yml
open Package/Package.xcodeproj
bump:
ifeq (,$(strip $(version)))
# Usage: make bump version=<number>
else
ruby -pi -e "gsub(%r{\d+\.\d+\.\d+}, %{"$(version)"})" QuickTableViewController.podspec
ruby -pi -e "gsub(%r{\d+\.\d+\.\d+}, %{"$(version)"})" .jazzy.yml
xcrun agvtool new-marketing-version $(version)
endif
carthage:
set -o pipefail && mint run carthage build --use-xcframeworks --no-skip-current --verbose | bundle exec xcpretty -c
docs:
test -d docs || git clone -b gh-pages --single-branch https://github.com/bcylin/QuickTableViewController.git docs
cd docs && git fetch origin gh-pages && git clean -f -d
cd docs && git checkout gh-pages && git reset --hard origin/gh-pages
bundle exec jazzy --config .jazzy.yml
for file in "html" "css" "js" "json"; do \
echo "Cleaning whitespace in *."$$file ; \
find docs/output -name "*."$$file -exec sed -E -i "" -e "s/[[:blank:]]*$$//" {} \; ; \
done
find docs -type f -execdir chmod 644 {} \;
cp -rfv docs/output/* docs
cd docs && \
git add . && \
git diff-index --quiet HEAD || \
git commit -m "[CI] Update documentation at $(shell date +'%Y-%m-%d %H:%M:%S %z')"
preview-docs:
make -B docs
open docs/index.html
update-docs:
make -B docs
cd docs && git push origin HEAD:gh-pages