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

chore: update script for sdk versioning #170

Merged

Conversation

mrehan27
Copy link
Contributor

@mrehan27 mrehan27 commented Nov 12, 2024

part of MBL-635

Changes

  • Modified update-version script to adjust only Flutter version in pubspec without updating the native iOS SDK version
  • Updated update-version script to align Android SDK source version with Flutter version
  • Refactored repetitive script code into a function within update-version and removed the redundant update-plugin script
  • Added Android SDK source file to .releaserc.json to ensure it is committed with releases

Release Checklist for Updating SDK Version

  • sd is installed in deploy workflow
  • Expected files update correctly
  • All updated files are included in .releaserc.json

Script Output (Locally Tested)

./scripts/update-version.sh "2.0.0"

Before Changes

Updating files to new version: 2.0.0
Updating pubspec.yaml
Check file, you should see version inside has been updated!
Now, updating plugin....
Updating files to new version: 2.0.0
Updating customer_io_plugin_version.dart
Check file, you should see version inside has been updated!

After Changes

Starting version update to: 2.0.0

Updating version in pubspec.yaml...
Done! Showing changes in pubspec.yaml:
diff --git a/pubspec.yaml b/pubspec.yaml
index d91304d..27868f6 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
 name: customer_io
 description: An official flutter plugin for Customer.io, an automated messaging platform for tech-savvy marketers.
-version: 1.5.2
+version: 2.0.0
 homepage: https://customer.io
 repository: https://github.com/customerio/customerio-flutter
 

Updating version in ./lib/customer_io_plugin_version.dart...
Done! Showing changes in ./lib/customer_io_plugin_version.dart:
diff --git a/lib/customer_io_plugin_version.dart b/lib/customer_io_plugin_version.dart
index 98d7f0f..e691fbf 100755
--- a/lib/customer_io_plugin_version.dart
+++ b/lib/customer_io_plugin_version.dart
@@ -1,2 +1,2 @@
 // Don't modify this line - it's automatically updated
-const version = "1.5.2";
+const version = "2.0.0";

Updating version in android/src/main/res/values/customer_io_config.xml...
Done! Showing changes in android/src/main/res/values/customer_io_config.xml:
diff --git a/android/src/main/res/values/customer_io_config.xml b/android/src/main/res/values/customer_io_config.xml
index 20b8417..325d399 100644
--- a/android/src/main/res/values/customer_io_config.xml
+++ b/android/src/main/res/values/customer_io_config.xml
@@ -9,5 +9,5 @@
     This will be updated by update-version script with Flutter package version
     whenever new version of Flutter package is released
     -->
-    <string name="customer_io_wrapper_sdk_client_version">1.5.2</string>
+    <string name="customer_io_wrapper_sdk_client_version">2.0.0</string>
 </resources>

Version update complete for targeted files.

@mrehan27 mrehan27 self-assigned this Nov 12, 2024
@mrehan27 mrehan27 requested a review from Shahroz16 November 12, 2024 09:51
Copy link

github-actions bot commented Nov 12, 2024

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


  • amiapp_flutter: 170.1.0 (28856751)

@mrehan27
Copy link
Contributor Author

@Shahroz16 I've tried to verify all the necessary changes, but please make sure to double-check any additional adjustments needed for this in the release 😅

Copy link
Collaborator

@Shahroz16 Shahroz16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just verify this on CI too? as in make a workflow which runs this script and then echo the content in the file after the script has run?

@mrehan27
Copy link
Contributor Author

@Shahroz16 Sounds good. Let's continue the discussion on Slack to explore more options to test this better.

@mrehan27 mrehan27 merged commit c1ec3de into feature/data-pipelines-support Nov 12, 2024
9 checks passed
@mrehan27 mrehan27 deleted the rehan/mbl-635-version-script branch November 12, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants