diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d22a3ff8..30c4517f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,6 +40,8 @@ jobs: run: dart format lib/ test/ --set-exit-if-changed - name: Import Sorter Check run: dart run import_sorter:main --no-comments --exit-if-changed + - name: Check version consistency + run: dart run scripts/check_version.dart - name: Dart Analyze Check run: flutter analyze - name: Dart Test Check diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 7f3114b1..8b9e84bd 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -26,7 +26,7 @@ jobs: - name: Install Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.10.0' + channel: 'stable' - name: Install project dependencies run: flutter pub get - name: Dart Format Check @@ -37,9 +37,17 @@ jobs: run: flutter analyze - name: Dart Test Check run: flutter test + - name: Check version consistency + run: dart run scripts/check_version.dart #- name: Check Publish Warnings # run: dart pub publish --dry-run - + - name: Publish + uses: k-paxian/dart-package-publisher@v1.5.1 + with: + credentialJson: ${{ secrets.CREDENTIAL_JSON }} + flutter: true + skipTests: true + force: true - run: flutter pub global activate dartdoc # Generate docs diff --git a/CHANGELOG.md b/CHANGELOG.md index 21737e03..d64a4b4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## 1.5.2 + +* Non-functional update, forcing the versions in + `'ios/livekit_client.podspec', 'macos/livekit_client.podspec', 'lib/src/livekit.dart'` + consistent with pubspec.yaml + ## 1.5.1 * Fixed Renderer bug for Windows. diff --git a/ios/livekit_client.podspec b/ios/livekit_client.podspec index 7de6171d..af997dcd 100644 --- a/ios/livekit_client.podspec +++ b/ios/livekit_client.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'livekit_client' - s.version = '1.5.1' + s.version = '1.5.2' s.summary = 'Open source platform for real-time audio and video.' s.description = 'Open source platform for real-time audio and video.' s.homepage = 'https://livekit.io/' diff --git a/lib/src/livekit.dart b/lib/src/livekit.dart index d94d8983..7f8d1066 100644 --- a/lib/src/livekit.dart +++ b/lib/src/livekit.dart @@ -19,7 +19,7 @@ import 'types/other.dart'; /// Main entry point to connect to a room. /// {@category Room} class LiveKitClient { - static const version = '1.4.2'; + static const version = '1.5.2'; /// Convenience method for connecting to a LiveKit server. /// Returns a [Room] upon a successful connect or throws when it fails. diff --git a/macos/livekit_client.podspec b/macos/livekit_client.podspec index 321b3cb8..41430190 100644 --- a/macos/livekit_client.podspec +++ b/macos/livekit_client.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'livekit_client' - s.version = '1.5.1' + s.version = '1.5.2' s.summary = 'Open source platform for real-time audio and video.' s.description = 'Open source platform for real-time audio and video.' s.homepage = 'https://livekit.io/' diff --git a/pubspec.yaml b/pubspec.yaml index 7e67f59d..15b02235 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ name: livekit_client description: Flutter Client SDK for LiveKit. Build real-time video and audio into your apps. Supports iOS, Android, and Web. -version: 1.5.1 +version: 1.5.2 homepage: https://livekit.io environment: @@ -52,6 +52,7 @@ dev_dependencies: flutter_lints: ^2.0.1 mockito: ^5.3.2 import_sorter: ^4.6.0 + yaml: ^3.1.2 import_sorter: comments: false diff --git a/scripts/check_version.dart b/scripts/check_version.dart new file mode 100644 index 00000000..718a558b --- /dev/null +++ b/scripts/check_version.dart @@ -0,0 +1,27 @@ +import 'dart:io'; + +import 'package:yaml/yaml.dart'; + +void main() { + File pubspec = File('pubspec.yaml'); + var doc = loadYaml(pubspec.readAsStringSync()); + var version = doc['version']; + + var files = [ + 'ios/livekit_client.podspec', + 'macos/livekit_client.podspec', + 'lib/src/livekit.dart' + ]; + + for (var file in files) { + var content = File(file).readAsStringSync(); + if (!content.contains(version)) { + RegExp exp = RegExp(r'(\d+\.\d+\.\d+)'); + RegExpMatch? match = exp.firstMatch(content); + // ignore: avoid_print + print( + 'Version mismatch in $file, pubspec.yaml version is $version != ${match![0]} in $file, please update'); + exit(1); + } + } +}