From 630c54d6fe569fe71c7413428a327e6b6f13cfbb Mon Sep 17 00:00:00 2001 From: Kitselyuk Egor Date: Fri, 30 Jun 2023 13:01:04 +0300 Subject: [PATCH 1/3] Add script for creating release branch --- git-release-branch.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 git-release-branch.sh diff --git a/git-release-branch.sh b/git-release-branch.sh new file mode 100755 index 00000000..8c0300bb --- /dev/null +++ b/git-release-branch.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Check if the parameter is provided +if [ $# -eq 0 ]; then + echo "Please provide the release version number as a parameter." + exit 1 +fi + +# Check if the version number matches the semver format +if ! [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+(-rc)?$ ]]; then + echo "The release version number does not match the semver format (X.Y.Z or X.Y.Z-rc)." + exit 1 +fi + +# Check the current Git branch +current_branch=$(git symbolic-ref --short HEAD) + +if [[ $current_branch != "develop" && ! $current_branch =~ ^release/[0-9]+\.[0-9]+\.[0-9]+(-rc)?$ ]]; then + echo "The current Git branch ($current_branch) is not 'develop' or in the format 'release-X.Y.Z' or 'release-X.Y.Z-rc'." + exit 1 +fi + +# Create a branch with the version name +version=$1 +branch_name="release/$version" +git branch $branch_name +git checkout $branch_name + +# Add changelog to the index and create a commit +podspec_file="Mindbox.podspec" +notifivation_podspec_file="MindboxNotifications.podspec" +current_version=$(grep -E '^\s+spec.version\s+=' "$podspec_file" | cut -d'"' -f2) +sed -i '' "s/^ spec.version = .*\"$/ spec.version = \"$version\"/" $podspec_file +sed -i '' "s/^ spec.version = .*\"$/ spec.version = \"$version\"/" $notifivation_podspec_file + +echo "Bump SDK version from $current_version to $version." + +git add $podspec_file +git add $notifivation_podspec_file +git commit -m "Bump SDK version to $version" + +echo "Branch $branch_name has been created." \ No newline at end of file From 4c8ae49f31ba58dd4bb5c843d2219d4737a61939 Mon Sep 17 00:00:00 2001 From: Akylbek Utekeshev Date: Mon, 3 Jul 2023 10:55:31 +0300 Subject: [PATCH 2/3] MBX-0000 Added SDKVersionProvider change version --- git-release-branch-create.sh | 45 ++++++++++++++++++++++++++++++++++++ git-release-branch.sh | 42 --------------------------------- 2 files changed, 45 insertions(+), 42 deletions(-) create mode 100755 git-release-branch-create.sh delete mode 100755 git-release-branch.sh diff --git a/git-release-branch-create.sh b/git-release-branch-create.sh new file mode 100755 index 00000000..f90b362f --- /dev/null +++ b/git-release-branch-create.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +#Check if the parameter is provided +if [ $# -eq 0 ]; then +echo "Please provide the release version number as a parameter." +exit 1 +fi + +#Check if the version number matches the semver format +if ! [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+(-rc)?$ ]]; then +echo "The release version number does not match the semver format (X.Y.Z or X.Y.Z-rc)." +exit 1 +fi + +#Check the current Git branch +current_branch=$(git symbolic-ref --short HEAD) + +if [[ $current_branch != "develop" && ! $current_branch =~ ^release/[0-9]+.[0-9]+.[0-9]+(-rc)?$ ]]; then +echo "The current Git branch ($current_branch) is not 'develop' or in the format 'release/X.Y.Z' or 'release/X.Y.Z-rc'." +exit 1 +fi + +#Create a branch with the version name +version=$1 +branch_name="release/$version" +git branch $branch_name +git checkout $branch_name + +#Add changelog to the index and create a commit +podspec_file="Mindbox.podspec" +notifivation_podspec_file="MindboxNotifications.podspec" +sdkversionprovider_file="SDKVersionProvider.swift" +current_version=$(grep -E '^\s+spec.version\s+=' "$podspec_file" | cut -d'"' -f2) +sed -i '' "s/^ spec.version = ."$/ spec.version = "$version"/" $podspec_file +sed -i '' "s/^ spec.version = ."$/ spec.version = "$version"/" $notifivation_podspec_file +sed -i '' "s/public static let sdkVersion = ".*"$/public static let sdkVersion = "$version"/" $sdkversionprovider_file + +echo "Bump SDK version from $current_version to $version." + +git add $podspec_file +git add $notifivation_podspec_file +git add $sdkversionprovider_file +git commit -m "Bump SDK version to $version" + +echo "Branch $branch_name has been created." diff --git a/git-release-branch.sh b/git-release-branch.sh deleted file mode 100755 index 8c0300bb..00000000 --- a/git-release-branch.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# Check if the parameter is provided -if [ $# -eq 0 ]; then - echo "Please provide the release version number as a parameter." - exit 1 -fi - -# Check if the version number matches the semver format -if ! [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+(-rc)?$ ]]; then - echo "The release version number does not match the semver format (X.Y.Z or X.Y.Z-rc)." - exit 1 -fi - -# Check the current Git branch -current_branch=$(git symbolic-ref --short HEAD) - -if [[ $current_branch != "develop" && ! $current_branch =~ ^release/[0-9]+\.[0-9]+\.[0-9]+(-rc)?$ ]]; then - echo "The current Git branch ($current_branch) is not 'develop' or in the format 'release-X.Y.Z' or 'release-X.Y.Z-rc'." - exit 1 -fi - -# Create a branch with the version name -version=$1 -branch_name="release/$version" -git branch $branch_name -git checkout $branch_name - -# Add changelog to the index and create a commit -podspec_file="Mindbox.podspec" -notifivation_podspec_file="MindboxNotifications.podspec" -current_version=$(grep -E '^\s+spec.version\s+=' "$podspec_file" | cut -d'"' -f2) -sed -i '' "s/^ spec.version = .*\"$/ spec.version = \"$version\"/" $podspec_file -sed -i '' "s/^ spec.version = .*\"$/ spec.version = \"$version\"/" $notifivation_podspec_file - -echo "Bump SDK version from $current_version to $version." - -git add $podspec_file -git add $notifivation_podspec_file -git commit -m "Bump SDK version to $version" - -echo "Branch $branch_name has been created." \ No newline at end of file From 26e716b6412ca90acc0b5ac35b72b95231eca225 Mon Sep 17 00:00:00 2001 From: Kitselyuk Egor Date: Thu, 10 Aug 2023 15:36:04 +0300 Subject: [PATCH 3/3] Bump SDK version to 2.7.0 --- Mindbox.podspec | 2 +- Mindbox.xcodeproj/project.pbxproj | 4 ---- Mindbox/Info.plist | 2 +- MindboxNotifications.podspec | 2 +- SDKVersionProvider/SDKVersionConfig.xcconfig | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Mindbox.podspec b/Mindbox.podspec index 53e20e8b..8b354eb3 100644 --- a/Mindbox.podspec +++ b/Mindbox.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "Mindbox" - spec.version = "2.7.0-rc" + spec.version = "2.7.0" spec.summary = "SDK for integration with Mindbox" spec.description = "This library allows you to integrate data transfer to Mindbox Marketing Cloud" spec.homepage = "https://github.com/mindbox-cloud/ios-sdk" diff --git a/Mindbox.xcodeproj/project.pbxproj b/Mindbox.xcodeproj/project.pbxproj index 8ef0f4c7..9777755c 100644 --- a/Mindbox.xcodeproj/project.pbxproj +++ b/Mindbox.xcodeproj/project.pbxproj @@ -2840,7 +2840,6 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 2.7.0; - MARKETING_VERSION = 2.6.4; PRODUCT_BUNDLE_IDENTIFIER = cloud.Mindbox; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -2869,7 +2868,6 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 2.7.0; - MARKETING_VERSION = 2.6.4; PRODUCT_BUNDLE_IDENTIFIER = cloud.Mindbox; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -2934,7 +2932,6 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 2.7.0; - MARKETING_VERSION = 2.6.4; PRODUCT_BUNDLE_IDENTIFIER = cloud.MindboxNotifications; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -2963,7 +2960,6 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 2.7.0; - MARKETING_VERSION = 2.6.4; PRODUCT_BUNDLE_IDENTIFIER = cloud.MindboxNotifications; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; diff --git a/Mindbox/Info.plist b/Mindbox/Info.plist index 9b3cc546..12feba26 100644 --- a/Mindbox/Info.plist +++ b/Mindbox/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 4654 + 4657 diff --git a/MindboxNotifications.podspec b/MindboxNotifications.podspec index f43472f2..2063d2a4 100644 --- a/MindboxNotifications.podspec +++ b/MindboxNotifications.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "MindboxNotifications" - spec.version = "2.7.0-rc" + spec.version = "2.7.0" spec.summary = "SDK for integration notifications with Mindbox" spec.description = "This library allows you to integrate notifications and transfer them to Mindbox Marketing Cloud" spec.homepage = "https://github.com/mindbox-cloud/ios-sdk" diff --git a/SDKVersionProvider/SDKVersionConfig.xcconfig b/SDKVersionProvider/SDKVersionConfig.xcconfig index 10cc1a5f..33935eff 100644 --- a/SDKVersionProvider/SDKVersionConfig.xcconfig +++ b/SDKVersionProvider/SDKVersionConfig.xcconfig @@ -1 +1 @@ -MARKETING_VERSION = 2.5.0 +MARKETING_VERSION = 2.7.0