Skip to content

Commit

Permalink
Merge pull request #50 from adobe/staging
Browse files Browse the repository at this point in the history
staging -> main for build script updates
  • Loading branch information
emdobrin authored Dec 18, 2021
2 parents 8954d8f + b4fc724 commit f13d910
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 37 deletions.
4 changes: 0 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ jobs:
- ./Pods
- ~/.cocoapods

- run:
name: Install SwiftLint
command: make install-swiftlint

- run:
name: Lint Source Code
command: make lint
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,8 @@ fastlane/test_output

## Cocoapods
Pods/

## Bundler
.bundle/
vender/

2 changes: 1 addition & 1 deletion AEPEdgeConsent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif which swiftlint >/dev/null; then\n swiftlint lint --config ${SRCROOT}/.swiftlint.yml Sources\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n\n";
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif which swiftlint >/dev/null; then\n ./Pods/SwiftLint/swiftlint lint --config ${SRCROOT}/.swiftlint.yml Sources\nelse\n echo \"warning: SwiftLint is not installed, please run the pod install command from the project root directory.\"\nfi\n\n";
};
2F2F6FB0A75D34F2B2AD37E2 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
22 changes: 12 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.3)
activesupport (5.2.4.4)
activesupport (5.2.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
Expand Down Expand Up @@ -52,36 +52,38 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.7)
concurrent-ruby (1.1.9)
escape (0.0.4)
ethon (0.12.0)
ffi (>= 1.3.0)
ffi (1.14.2)
ethon (0.14.0)
ffi (>= 1.15.0)
ffi (1.15.3)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.8.7)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
json (2.5.1)
minitest (5.14.3)
minitest (5.14.4)
molinillo (0.6.6)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.6)
rexml (3.2.5)
ruby-macho (1.4.0)
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
xcodeproj (1.19.0)
xcodeproj (1.20.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)

PLATFORMS
ruby
Expand All @@ -90,4 +92,4 @@ DEPENDENCIES
cocoapods (= 1.10.0)

BUNDLED WITH
2.1.2
2.1.4
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ PROJECT_NAME = $(EXTENSION_NAME)
TARGET_NAME_XCFRAMEWORK = $(EXTENSION_NAME).xcframework
SCHEME_NAME_XCFRAMEWORK = $(EXTENSION_NAME)XCF

SIMULATOR_ARCHIVE_PATH = ./build/ios_simulator.xcarchive/Products/Library/Frameworks/
IOS_ARCHIVE_PATH = ./build/ios.xcarchive/Products/Library/Frameworks/
CURR_DIR := ${CURDIR}
SIMULATOR_ARCHIVE_PATH = $(CURR_DIR)/build/ios_simulator.xcarchive/Products/Library/Frameworks/
SIMULATOR_ARCHIVE_DSYM_PATH = $(CURR_DIR)/build/ios_simulator.xcarchive/dSYMs/
IOS_ARCHIVE_PATH = $(CURR_DIR)/build/ios.xcarchive/Products/Library/Frameworks/
IOS_ARCHIVE_DSYM_PATH = $(CURR_DIR)/build/ios.xcarchive/dSYMs/

setup:
(pod install)

setup-tools: install-swiftlint install-githook
setup-tools: install-githook

pod-repo-update:
(pod repo update)
Expand All @@ -31,28 +34,25 @@ open:
clean:
(rm -rf build)

archive:
archive: pod-update
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 -framework $(IOS_ARCHIVE_PATH)$(EXTENSION_NAME).framework -output ./build/$(TARGET_NAME_XCFRAMEWORK)
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)

test:
@echo "######################################################################"
@echo "### Testing iOS"
@echo "######################################################################"
xcodebuild test -workspace $(PROJECT_NAME).xcworkspace -scheme $(PROJECT_NAME) -destination 'platform=iOS Simulator,name=iPhone 11 Pro' -derivedDataPath build/out -enableCodeCoverage YES

install-swiftlint:
HOMEBREW_NO_AUTO_UPDATE=1 brew install swiftlint && brew cleanup swiftlint

install-githook:
./tools/git-hooks/setup.sh

lint-autocorrect:
(swiftlint autocorrect --format)
(./Pods/SwiftLint/swiftlint autocorrect --format)

lint:
(swiftlint lint Sources TestApp/)
(./Pods/SwiftLint/swiftlint lint Sources TestApp/)

check-version:
(sh ./Script/version.sh $(VERSION))
Expand Down
2 changes: 2 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use_frameworks!
workspace 'AEPEdgeConsent'
project 'AEPEdgeConsent.xcodeproj'

pod 'SwiftLint', '0.44.0'

target 'AEPEdgeConsent' do
pod 'AEPCore'
pod 'AEPServices'
Expand Down
22 changes: 13 additions & 9 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
PODS:
- AEPCore (3.1.0):
- AEPRulesEngine (= 1.0.0)
- AEPServices (= 3.1.0)
- AEPRulesEngine (1.0.0)
- AEPServices (3.1.0)
- AEPCore (3.3.1):
- AEPRulesEngine (= 1.0.1)
- AEPServices (= 3.3.1)
- AEPRulesEngine (1.0.1)
- AEPServices (3.3.1)
- SwiftLint (0.44.0)

DEPENDENCIES:
- AEPCore
- AEPServices
- SwiftLint (= 0.44.0)

SPEC REPOS:
trunk:
- AEPCore
- AEPRulesEngine
- AEPServices
- SwiftLint

SPEC CHECKSUMS:
AEPCore: 026568b04d8c302ad801a6b4ed6ec3c160817ef6
AEPRulesEngine: 8bbc694fce6900cd33b2496c7d4b33ee2eeffc46
AEPServices: cc1ec2987185ab01d62f6d41be0bb94a1b892efb
AEPCore: fc1398728b6b2a4dcc8dc96455f69ec144e087c0
AEPRulesEngine: 5075ed294026a12e37bd26fe260f74604d205354
AEPServices: c49e7b6ef17ec9f874b015f68ac7d2436235282f
SwiftLint: e96c0a8c770c7ebbc4d36c55baf9096bb65c4584

PODFILE CHECKSUM: 4417aab26de0ba46fdf9d77b5ab95f40d252d13e
PODFILE CHECKSUM: df8c969b5e4f98f7d1df738b00d9511b06b4b07f

COCOAPODS: 1.10.1
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ coverage:
- "./Tests/**/*"
- "./Tests/.*"
- "./TestApp/.*"
- "./build"

parsers:
gcov:
Expand All @@ -29,4 +30,3 @@ comment:
layout: "header, diff"
behavior: default
require_changes: no

3 changes: 1 addition & 2 deletions tools/git-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
SWIFTLINT=swiftlint
SWIFTLINT=./Pods/SwiftLint/swiftlint
CONFIG=.swiftlint.yml

if ! command -v "${SWIFTLINT}" &> /dev/null; then
Expand Down Expand Up @@ -29,4 +29,3 @@ fi
for file_path in $(git diff --cached --name-only --diff-filter=d | grep ".swift$"); do
git add "$file_path"
done

0 comments on commit f13d910

Please sign in to comment.