-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [MT-1497] Version 1.2.0 Target XCode 15 and iOS 12 Add publish and build scripts
- Loading branch information
Showing
11 changed files
with
160 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
github "BranchMetrics/ios-branch-deep-linking" ~> 1.40 | ||
github "tealium/tealium-swift" ~> 2.9 | ||
github "tealium/tealium-swift" ~> 2.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>output_path</key> | ||
<string>tealium-xcframeworks</string> | ||
<key>frameworks</key> | ||
<array> | ||
<dict> | ||
<key>name</key> | ||
<string>TealiumBranch</string> | ||
<key>targets</key> | ||
<array> | ||
<dict> | ||
<key>sdk</key> | ||
<string>iOS</string> | ||
<key>project</key> | ||
<string>TealiumBranch.xcodeproj</string> | ||
<key>scheme</key> | ||
<string>TealiumBranch</string> | ||
</dict> | ||
<dict> | ||
<key>sdk</key> | ||
<string>iOSSimulator</string> | ||
<key>project</key> | ||
<string>TealiumBranch.xcodeproj</string> | ||
<key>scheme</key> | ||
<string>TealiumBranch</string> | ||
</dict> | ||
</array> | ||
</dict> | ||
</array> | ||
<key>finalActions</key> | ||
<array> | ||
<string>openDirectory</string> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# Uncomment the next line to define a global platform for your project | ||
platform :ios, '11.0' | ||
platform :ios, '12.0' | ||
|
||
target 'TealiumBranchExample' do | ||
# Comment the next line if you don't want to use dynamic frameworks | ||
use_frameworks! | ||
|
||
# Pods for TealiumBranchExample | ||
pod 'TealiumBranch', :path=> '../' | ||
pod 'tealium-swift/Lifecycle', '~> 2.6' | ||
pod 'tealium-swift/Lifecycle', '~> 2.12' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# A script to verify that the repo is up to date and the versions are correct and then runs the pod trunk push command | ||
|
||
constants=$(<Sources/BranchConstants.swift) | ||
regex="^.*static let version \= \"([0-9\.]*)\"" | ||
|
||
if [[ $constants =~ $regex ]] | ||
then | ||
versionConstant=${BASH_REMATCH[1]} | ||
else | ||
echo "Couldn't match the library version, exiting" | ||
exit 1 | ||
fi | ||
echo Version Constant $versionConstant | ||
|
||
podspecFile=$(<TealiumBranch.podspec) | ||
podspecRegex="^.*spec.version[[:space:]]*\= \"([0-9\.]*)\"" | ||
|
||
if [[ $podspecFile =~ $podspecRegex ]] | ||
then | ||
podspecVersion=${BASH_REMATCH[1]} | ||
else | ||
echo "Couldn't match the podspec version, exiting" | ||
exit 1 | ||
fi | ||
echo Podspec Version $podspecVersion | ||
|
||
if [ $podspecVersion != $versionConstant ] | ||
then | ||
echo "The podspec version \"${podspecVersion}\" is different from the version constant \"${versionConstant}\".\nDid you forget to update one of the two?" | ||
exit 1 | ||
fi | ||
|
||
branch_name="$(git rev-parse --abbrev-ref HEAD)" | ||
echo Current branch $branch_name | ||
if [ $branch_name != "main" ] | ||
then | ||
echo "Check out to main branch before trying to publish. Current branch: ${branch_name}" | ||
exit 1 | ||
fi | ||
|
||
git fetch --tags | ||
if ! git diff --quiet remotes/origin/main | ||
then | ||
echo "Make sure you are up to date with the remote before publishing" | ||
exit 1 | ||
fi | ||
|
||
latestTag=$(git describe --tags --abbrev=0) | ||
|
||
echo Latest tag $latestTag | ||
if [ $latestTag != $versionConstant ] | ||
then | ||
echo "The latest published tag \"${latestTag}\" is different from the version constant \"${versionConstant}\".\nDid you forget to add the tag to the release or did you forget to update the Constant?" | ||
exit 1 | ||
fi | ||
|
||
echo "All checks are passed, ready to release to CocoaPods" | ||
|
||
echo "Do you wish to publish to CocoaPods?" | ||
select yn in "Yes" "No"; do | ||
case $yn in | ||
Yes ) echo "Ok, running \"pod trunk push\" now."; pod trunk push; break;; | ||
No ) echo "Ok, skip the release for now."; exit;; | ||
esac | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# variable declarations | ||
BUILD_PATH="build" | ||
XCFRAMEWORK_PATH="tealium-xcframeworks" | ||
ZIP_PATH="tealium.xcframework.zip" | ||
TEAM_NAME=XC939GDC9P | ||
|
||
# zip all the xcframeworks | ||
function zip_xcframeworks { | ||
if [[ -d "${XCFRAMEWORK_PATH}" ]]; then | ||
ditto -ck --rsrc --sequesterRsrc --keepParent "${XCFRAMEWORK_PATH}" "${ZIP_PATH}" | ||
rm -rf "${XCFRAMEWORK_PATH}" | ||
fi | ||
} | ||
|
||
# do the work | ||
surmagic xcf | ||
|
||
# Code Sign | ||
for frameworkname in $XCFRAMEWORK_PATH/*.xcframework; do | ||
echo "Codesigning $frameworkname" | ||
codesign --timestamp -s $TEAM_NAME $frameworkname --verbose | ||
codesign -v $frameworkname --verbose | ||
done | ||
|
||
zip_xcframeworks | ||
|
||
echo "" | ||
echo "Done! Upload ${ZIP_PATH} to GitHub when you create the release." |