Skip to content

Commit e26b05c

Browse files
committed
🚀 Bump version to 3.0.2
1 parent 88a7f7d commit e26b05c

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ packages:
6363
path: ".."
6464
relative: true
6565
source: path
66-
version: "3.0.0"
66+
version: "3.0.1"
6767
crypto:
6868
dependency: transitive
6969
description:

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Demonstrates how to use the courier_flutter plugin.
55
# pub.dev using `flutter pub publish`. This is preferred for private packages.
66
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
77

8-
version: 1.0.0+7
8+
version: 1.0.0+8
99

1010
environment:
1111
sdk: '>=2.18.1 <3.0.0'

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: courier_flutter
22
description: Inbox, Push Notifications and Preferences for Flutter
3-
version: 3.0.1
3+
version: 3.0.2
44
homepage: https://courier.com
55

66
environment:

scripts/build_demo_app.sh

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
11
#!/bin/bash
22

3+
# Function to increment build number
4+
increment_build_number() {
5+
local pubspec_file="pubspec.yaml"
6+
if [ ! -f "$pubspec_file" ]; then
7+
echo "$pubspec_file not found."
8+
exit 1
9+
fi
10+
11+
local build_number=$(grep -E '^\s*version:' "$pubspec_file" | sed -E 's/.*\+([0-9]+).*/\1/')
12+
if [ -z "$build_number" ]; then
13+
echo "❌ Build number not found in $pubspec_file."
14+
exit 1
15+
fi
16+
17+
build_number=$((build_number + 1))
18+
echo "Incrementing build number to $build_number."
19+
20+
sed -i '' -E "s/(version: .+)\+[0-9]+/\1+$build_number/" "$pubspec_file"
21+
}
22+
323
# Navigate to the example directory
424
cd ../example || { echo "Failed to navigate to the example directory. Please ensure the path is correct."; exit 1; }
525
echo "Navigated to the example directory."
626

27+
# Increment Flutter build number
28+
increment_build_number
29+
730
# Build Android app bundle
831
echo "🤖 Building Android app bundle..."
932
flutter build appbundle
@@ -32,4 +55,4 @@ echo "✅ iOS app bundle built successfully."
3255
# Open the iOS build in Xcode Organizer
3356
open build/ios/archive/Runner.xcarchive
3457

35-
echo "Both Android and iOS app bundles have been generated successfully."
58+
echo "Both Android and iOS app bundles have been generated successfully."

0 commit comments

Comments
 (0)