From 13de860a22d5cafaaa9672da806f4b0b2a957e30 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 22 Mar 2024 13:44:13 -0400 Subject: [PATCH 1/7] fix(shorebird_cli): detect Azure pipeline CI environment (#1811) --- packages/shorebird_cli/lib/src/shorebird_env.dart | 6 +++++- packages/shorebird_cli/test/src/shorebird_env_test.dart | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/shorebird_cli/lib/src/shorebird_env.dart b/packages/shorebird_cli/lib/src/shorebird_env.dart index 372a95f66..560067924 100644 --- a/packages/shorebird_cli/lib/src/shorebird_env.dart +++ b/packages/shorebird_cli/lib/src/shorebird_env.dart @@ -230,5 +230,9 @@ class ShorebirdEnv { // https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables || - platform.environment.containsKey('GITHUB_ACTIONS'); + platform.environment.containsKey('GITHUB_ACTIONS') + + // https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml + || + platform.environment.containsKey('TF_BUILD'); } diff --git a/packages/shorebird_cli/test/src/shorebird_env_test.dart b/packages/shorebird_cli/test/src/shorebird_env_test.dart index 11d332735..bbe61775a 100644 --- a/packages/shorebird_cli/test/src/shorebird_env_test.dart +++ b/packages/shorebird_cli/test/src/shorebird_env_test.dart @@ -607,6 +607,11 @@ base_url: https://example.com'''); expect(runWithOverrides(() => shorebirdEnv.isRunningOnCI), isTrue); }); + test('returns true if TF_BUILD is set', () { + when(() => platform.environment).thenReturn({'TF_BUILD': 'True'}); + expect(runWithOverrides(() => shorebirdEnv.isRunningOnCI), isTrue); + }); + test('returns false if no relevant environment variables are set', () { when(() => platform.environment).thenReturn({}); expect(runWithOverrides(() => shorebirdEnv.isRunningOnCI), isFalse); From e15958419c00e10bcdbe34aae1eda4b9df76d3fc Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 22 Mar 2024 14:06:37 -0400 Subject: [PATCH 2/7] fix(shorebird_cli): ensure flutter artifacts are installed in `shorebird preview` (#1812) --- .../shorebird_cli/lib/src/commands/preview_command.dart | 2 ++ .../test/src/commands/preview_command_test.dart | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/packages/shorebird_cli/lib/src/commands/preview_command.dart b/packages/shorebird_cli/lib/src/commands/preview_command.dart index ddb5c2284..7a28dc387 100644 --- a/packages/shorebird_cli/lib/src/commands/preview_command.dart +++ b/packages/shorebird_cli/lib/src/commands/preview_command.dart @@ -304,6 +304,8 @@ class PreviewCommand extends ShorebirdCommand { required DeploymentTrack track, String? deviceId, }) async { + await iosDeploy.installIfNeeded(); + const platform = ReleasePlatform.ios; final runnerDirectory = Directory( getArtifactPath( diff --git a/packages/shorebird_cli/test/src/commands/preview_command_test.dart b/packages/shorebird_cli/test/src/commands/preview_command_test.dart index 65684ed9e..020a10e75 100644 --- a/packages/shorebird_cli/test/src/commands/preview_command_test.dart +++ b/packages/shorebird_cli/test/src/commands/preview_command_test.dart @@ -976,6 +976,7 @@ channel: ${track.channel} device: any(named: 'device'), ), ).thenAnswer((_) async => ExitCode.success.code); + when(() => iosDeploy.installIfNeeded()).thenAnswer((_) async {}); when( () => iosDeploy.installAndLaunchApp( bundlePath: any(named: 'bundlePath'), @@ -1002,6 +1003,11 @@ channel: ${track.channel} ..createSync(recursive: true) ..writeAsStringSync('app_id: $appId', flush: true); + test('ensures ios-deploy is installed', () async { + await runWithOverrides(command.run); + verify(() => iosDeploy.installIfNeeded()).called(1); + }); + test('exits with code 70 when querying for release artifact fails', () async { final exception = Exception('oops'); From fddd5ec34bf490e357ffc3ae82d13972474dc371 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 22 Mar 2024 14:15:51 -0400 Subject: [PATCH 3/7] chore(shorebird_cli): release 0.27.1 (#1813) --- RELEASE_NOTES.md | 8 ++++++++ packages/shorebird_cli/lib/src/version.dart | 2 +- packages/shorebird_cli/pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 78a45efce..265c03ad3 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,6 +2,14 @@ This section contains past updates we've sent to customers via Discord. +## 0.27.1 (March 22, 2024) + +🪟 Automatically detects a CI environment when running on an Azure pipeline. +👀 Fixes a bug in `shorebird preview` where the command could fail if Flutter +had not downloaded the necessary dependencies. + +📚 Release notes can be found at https://github.com/shorebirdtech/shorebird/releases/tag/v0.27.1 + ## 0.27.0 (March 21, 2024) 🛑 Removes support for the `--force` flag for release and patch commands (see below) diff --git a/packages/shorebird_cli/lib/src/version.dart b/packages/shorebird_cli/lib/src/version.dart index 20a0174b5..1bbacd046 100644 --- a/packages/shorebird_cli/lib/src/version.dart +++ b/packages/shorebird_cli/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '0.27.0'; +const packageVersion = '0.27.1'; diff --git a/packages/shorebird_cli/pubspec.yaml b/packages/shorebird_cli/pubspec.yaml index cbe4eb460..b3fb7189c 100644 --- a/packages/shorebird_cli/pubspec.yaml +++ b/packages/shorebird_cli/pubspec.yaml @@ -1,6 +1,6 @@ name: shorebird_cli description: Command-line tool to interact with Shorebird's services. -version: 0.27.0 +version: 0.27.1 repository: https://github.com/shorebirdtech/shorebird publish_to: none From 4e3e322f6acd2476383af4d9ac8441438fa885ef Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Fri, 22 Mar 2024 14:57:39 -0500 Subject: [PATCH 4/7] chore: update to Flutter 3.19.4 --- bin/internal/flutter.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/internal/flutter.version b/bin/internal/flutter.version index d6df24524..2bf0c223f 100644 --- a/bin/internal/flutter.version +++ b/bin/internal/flutter.version @@ -1 +1 @@ -0addba5b750987523c04ebe69e9755509369615a +6192918b0ced633fece2b14701035421c049c21d From 35ef5c68da48d89125ba5e4115e334dd67222e9e Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Fri, 22 Mar 2024 13:52:42 -0700 Subject: [PATCH 5/7] chore: roll flutter version to 6e1c9add71baf57b4178d4d315cea7ba52afe355 --- bin/internal/flutter.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/internal/flutter.version b/bin/internal/flutter.version index 2bf0c223f..20fca8538 100644 --- a/bin/internal/flutter.version +++ b/bin/internal/flutter.version @@ -1 +1 @@ -6192918b0ced633fece2b14701035421c049c21d +6e1c9add71baf57b4178d4d315cea7ba52afe355 From f34e9a73efad3f7e7542d41d0ae6a17600e26988 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 22 Mar 2024 17:10:49 -0400 Subject: [PATCH 6/7] fix(shorebird_cli): fix e2e tests (#1816) --- .../shorebird_cli_integration_test.dart | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart b/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart index 84dfbc710..56614afe3 100644 --- a/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart +++ b/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart @@ -15,11 +15,6 @@ import 'package:shorebird_code_push_client/shorebird_code_push_client.dart'; import 'package:test/test.dart'; import 'package:uuid/uuid.dart'; -const tokenWarningMessage = ''' -$shorebirdTokenEnvVar needs to be updated before the next major release. -Run `shorebird login:ci` to obtain a new token. -'''; - R runWithOverrides(R Function() body) { return runScoped( body, @@ -99,7 +94,7 @@ void main() { 'shorebird init --verbose', workingDirectory: cwd, ); - expect(initShorebirdResult.stderr, equals(tokenWarningMessage)); + expect(initShorebirdResult.stderr, isEmpty); expect(initShorebirdResult.exitCode, equals(0)); final shorebirdYamlPath = p.join(cwd, 'shorebird.yaml'); @@ -139,7 +134,7 @@ void main() { 'shorebird release android --verbose', workingDirectory: cwd, ); - expect(shorebirdReleaseResult.stderr, equals(tokenWarningMessage)); + expect(shorebirdReleaseResult.stderr, isEmpty); expect( shorebirdReleaseResult.stdout, contains('Published Release $releaseVersion!'), @@ -188,7 +183,7 @@ void main() { 'shorebird patch android --verbose', workingDirectory: cwd, ); - expect(shorebirdPatchResult.stderr, equals(tokenWarningMessage)); + expect(shorebirdPatchResult.stderr, isEmpty); expect(shorebirdPatchResult.stdout, contains('Published Patch 1!')); expect(shorebirdPatchResult.exitCode, equals(0)); From a7173796c7ee2a8b6179f3257d391d4b9a708aaf Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 22 Mar 2024 18:01:20 -0400 Subject: [PATCH 7/7] chore(shorebird_cli): release 0.27.2 (#1817) --- RELEASE_NOTES.md | 6 ++++++ packages/shorebird_cli/lib/src/version.dart | 2 +- packages/shorebird_cli/pubspec.lock | 4 ++-- packages/shorebird_cli/pubspec.yaml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 265c03ad3..71cc756bf 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,6 +2,12 @@ This section contains past updates we've sent to customers via Discord. +## 0.27.2 (March 22, 2024) + +🐦 Support for Flutter 3.19.4 + +📚 Release notes can be found at https://github.com/shorebirdtech/shorebird/releases/tag/v0.27.2 + ## 0.27.1 (March 22, 2024) 🪟 Automatically detects a CI environment when running on an Azure pipeline. diff --git a/packages/shorebird_cli/lib/src/version.dart b/packages/shorebird_cli/lib/src/version.dart index 1bbacd046..666f86932 100644 --- a/packages/shorebird_cli/lib/src/version.dart +++ b/packages/shorebird_cli/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '0.27.1'; +const packageVersion = '0.27.2'; diff --git a/packages/shorebird_cli/pubspec.lock b/packages/shorebird_cli/pubspec.lock index c97f11afc..c37400348 100644 --- a/packages/shorebird_cli/pubspec.lock +++ b/packages/shorebird_cli/pubspec.lock @@ -762,10 +762,10 @@ packages: dependency: transitive description: name: vm_service - sha256: e7d5ecd604e499358c5fe35ee828c0298a320d54455e791e9dcf73486bc8d9f0 + sha256: a75f83f14ad81d5fe4b3319710b90dec37da0e22612326b696c9e1b8f34bbf48 url: "https://pub.dev" source: hosted - version: "14.1.0" + version: "14.2.0" watcher: dependency: transitive description: diff --git a/packages/shorebird_cli/pubspec.yaml b/packages/shorebird_cli/pubspec.yaml index b3fb7189c..4dcc539e3 100644 --- a/packages/shorebird_cli/pubspec.yaml +++ b/packages/shorebird_cli/pubspec.yaml @@ -1,6 +1,6 @@ name: shorebird_cli description: Command-line tool to interact with Shorebird's services. -version: 0.27.1 +version: 0.27.2 repository: https://github.com/shorebirdtech/shorebird publish_to: none