This repository has been archived by the owner on Nov 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Makefile
64 lines (47 loc) · 1.84 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
60
61
62
63
64
# COVID-NL APP iOS Makefile
XCODE_TEMPLATE_PATH_SRC="tools/Xcode Templates/Component.xctemplate"
XCODE_TEMPLATE_PATH_DST="${HOME}/Library/Developer/Xcode/Templates/File Templates/COVID-NL"
EN_MOCKS_PATH="Sources/ENTests/Mocks.swift"
EN_CORE_MOCKS_PATH="Sources/ENCoreTests/Mocks.swift"
# Creates xcodeproj
project: touch_mock_files_if_needed
vendor/XcodeGen/.build/apple/Products/Release/xcodegen
open EN.xcodeproj
generate_project: touch_mock_files_if_needed
vendor/XcodeGen/.build/apple/Products/Release/xcodegen
# Initializes dev environment
dev: install_xcode_templates install_dev_deps
install_xcode_templates:
@echo "Installing latest xcode template"
@mkdir -p ${XCODE_TEMPLATE_PATH_DST}
@cp -rf ${XCODE_TEMPLATE_PATH_SRC} ${XCODE_TEMPLATE_PATH_DST}
install_dev_deps: build_xcodegen build_swiftformat build_mockolo
@echo "All dependencies are installed"
@echo "You're ready to go"
ci_build: install_ci_deps
@echo "CI build"
xcodebuild -project EN.xcodeproj -scheme ENCore
install_ci_deps: build_xcodegen build_mockolo
@echo "All CI dependencies are installed"
build_mockolo:
cd vendor/mockolo && swift build -c release
build_xcodegen:
cd vendor/XcodeGen && make build
build_swiftformat:
cd vendor/SwiftFormat && swift build -c release
$(shell sh tools/scripts/pre-commit.sh)
build_openssl:
cd vendor/OpenSSL-for-iPhone && ./build-libssl.sh && ./create-openssl-framework.sh
push_notification:
@xcrun simctl push booted nl.rijksoverheid.en tools/push/payload.apns
clean_snapshots:
@echo "Removing all __Snapshot__ folders"
@rm -rf `find Sources/ -type d -name __Snapshots__`
@echo "Re-run tests for current Snapshot tests to be generated"
buildinfo:
@echo "Generating buildinfo.."
bash tools/scripts/buildinfo.sh release > .buildinfo
touch_mock_files_if_needed:
ifneq ($(wildcard ${EN_CORE_MOCKS_PATH}), "")
@touch ${EN_CORE_MOCKS_PATH}
endif