-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
86 lines (63 loc) · 3.31 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
export EXTENSION_NAME = AEPUserProfile
PROJECT_NAME = $(EXTENSION_NAME)
TARGET_NAME_XCFRAMEWORK = $(EXTENSION_NAME).xcframework
SCHEME_NAME_XCFRAMEWORK = AEPUserProfileXCFramework
CURR_DIR := ${CURDIR}
SIMULATOR_ARCHIVE_PATH = ./build/ios_simulator.xcarchive/Products/Library/Frameworks/
SIMULATOR_ARCHIVE_DSYM_PATH = $(CURR_DIR)/build/ios_simulator.xcarchive/dSYMs/
IOS_ARCHIVE_PATH = ./build/ios.xcarchive/Products/Library/Frameworks/
IOS_ARCHIVE_DSYM_PATH = $(CURR_DIR)/build/ios.xcarchive/dSYMs/
lint-autocorrect:
./Pods/SwiftLint/swiftlint --fix
lint:
./Pods/SwiftLint/swiftlint lint
check-format:
swiftformat --lint AEPUserProfile/Sources
format:
swiftformat .
generate-lcov:
xcrun llvm-cov export -format="lcov" .build/debug/AEPRulesEnginePackageTests.xctest/Contents/MacOS/AEPRulesEnginePackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
pod-install:
(pod install --repo-update)
pod-repo-update:
(pod repo update)
pod-update: pod-repo-update
(pod update)
open:
open $(PROJECT_NAME).xcworkspace
clean:
(rm -rf build)
test: clean
@echo "######################################################################"
@echo "### Testing iOS"
@echo "######################################################################"
xcodebuild test -workspace $(PROJECT_NAME).xcworkspace -scheme $(PROJECT_NAME)Tests -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath build/out -enableCodeCoverage YES
archive: clean pod-install
xcodebuild archive -workspace $(PROJECT_NAME).xcworkspace -scheme $(SCHEME_NAME_XCFRAMEWORK) -archivePath "./build/ios.xcarchive" -sdk iphoneos -destination="iOS" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
xcodebuild archive -workspace $(PROJECT_NAME).xcworkspace -scheme $(SCHEME_NAME_XCFRAMEWORK) -archivePath "./build/ios_simulator.xcarchive" -sdk iphonesimulator -destination="iOS Simulator" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework -framework $(SIMULATOR_ARCHIVE_PATH)$(EXTENSION_NAME).framework -debug-symbols $(SIMULATOR_ARCHIVE_DSYM_PATH)$(EXTENSION_NAME).framework.dSYM -framework $(IOS_ARCHIVE_PATH)$(EXTENSION_NAME).framework -debug-symbols $(IOS_ARCHIVE_DSYM_PATH)$(EXTENSION_NAME).framework.dSYM -output ./build/$(TARGET_NAME_XCFRAMEWORK)
zip:
cd build && zip -r $(EXTENSION_NAME).xcframework.zip $(EXTENSION_NAME).xcframework/
swift package compute-checksum build/$(EXTENSION_NAME).xcframework.zip
latest-version:
(which jq)
(pod spec cat AEPUserProfile | jq '.version' | tr -d '"')
version-podspec-local:
(which jq)
(pod ipc spec AEPUserProfile.podspec | jq '.version' | tr -d '"')
podspec-local-dependency-version:
(which jq)
(echo "AEPUserProfile:")
(echo " -AEPService: $(shell pod ipc spec AEPUserProfile.podspec | jq '.dependencies.AEPServices[0]'| tr -d '"')")
(echo " -AEPCore: $(shell pod ipc spec AEPUserProfile.podspec | jq '.dependencies.AEPCore[0]'| tr -d '"')")
version-source-code:
(cat ./AEPUserProfile/Sources/UserProfileConstants.swift | egrep '\s*EXTENSION_VERSION\s*=\s*\"(.*)\"' | ruby -e "puts gets.scan(/\"(.*)\"/)[0] " | tr -d '"')
# make check-version VERSION=3.0.1
check-version:
(sh ./script/version.sh $(VERSION))
test-SPM-integration:
(sh ./script/test-SPM.sh)
test-podspec:
(sh ./script/test-podspec.sh)
pod-lint:
(pod lib lint --allow-warnings --verbose --swift-version=5.1)