From b475c569e1cd2199ff0d450008d470e7c2a76b8f Mon Sep 17 00:00:00 2001 From: Shahroz Khan Date: Sun, 26 May 2024 10:42:02 -0400 Subject: [PATCH] fix script --- .github/workflows/tag-and-release.yml | 11 +++++++++-- AnalyticsSwiftCIO.podspec | 7 +++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tag-and-release.yml b/.github/workflows/tag-and-release.yml index 613ce4f..c59ec5b 100644 --- a/.github/workflows/tag-and-release.yml +++ b/.github/workflows/tag-and-release.yml @@ -17,6 +17,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0 + + - name: Install CocoaPods + run: gem install cocoapods + - name: Create and push tag uses: rickstaa/action-create-tag@v1 id: tag_create @@ -25,8 +33,7 @@ jobs: - name: Manually update version and tag in podspec run: | - sed -i.bak 's/s.version *= *"[^"]*"/s.version = "${{ github.event.inputs.tag }}"/' AnalyticsSwiftCIO.podspec - sed -i.bak 's/:tag => *"[^"]*"/:tag => "${{ github.event.inputs.tag }}"/' AnalyticsSwiftCIO.podspec + sed -i.bak 's/\(version = \)"[^"]*"/\1"${{ github.event.inputs.tag }}"/' AnalyticsSwiftCIO.podspec rm AnalyticsSwiftCIO.podspec.bak - name: Commit and push podspec diff --git a/AnalyticsSwiftCIO.podspec b/AnalyticsSwiftCIO.podspec index 8631650..2442426 100644 --- a/AnalyticsSwiftCIO.podspec +++ b/AnalyticsSwiftCIO.podspec @@ -1,6 +1,9 @@ Pod::Spec.new do |s| + + version = "1.5.12+cio.1" # Define your version variable here + s.name = "AnalyticsSwiftCIO" - s.version = "1.5.12+cio.2" + s.version = version s.license = { :type => 'MIT', :file => './LICENSE' } s.summary = "Customer.io Data Pipelines analytics client for Swift app (iOS/tvOS/watchOS/macOS/Linux)." s.homepage = "https://github.com/customerio/cdp-analytics-swift" @@ -8,7 +11,7 @@ Pod::Spec.new do |s| # Make sure the tag is the same as what SPM customers are using. # update branch to version - s.source = { :git => 'https://github.com/customerio/cdp-analytics-swift.git', :tag => '1.5.12+cio.1' } + s.source = { :git => 'https://github.com/customerio/cdp-analytics-swift.git', :tag => version } s.ios.deployment_target = "13.0" s.requires_arc = true