Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.12.1 #325

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build/
.swiftpm/*
tealium-xcframeworks/
builder/tealium-xcframeworks/
builder/tealium-xcframeworks.zip
tealium.xcframework.zip
build/
builder/build/
veracode/
Expand Down
50 changes: 50 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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=$(<tealium/core/TealiumConstants.swift)
regex="^.*public static let libraryVersion \= \"([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
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

2 changes: 1 addition & 1 deletion tealium/core/TealiumConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public enum Dispatchers {}

public enum TealiumValue {
public static let libraryName = "swift"
public static let libraryVersion = "2.11.1"
public static let libraryVersion = "2.12.1"
// This is the current limit for performance reasons. May be increased in future
public static let maxEventBatchSize = 10
public static let defaultMinimumDiskSpace: Int32 = 20_000_000
Expand Down
Loading