Skip to content

Commit

Permalink
Merge branch 'main' into bo/linker-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
eseidel authored Mar 24, 2024
2 parents 68faa86 + a717379 commit 65fa1db
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 14 deletions.
14 changes: 14 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

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.
👀 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)
Expand Down
2 changes: 1 addition & 1 deletion bin/internal/flutter.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0addba5b750987523c04ebe69e9755509369615a
6e1c9add71baf57b4178d4d315cea7ba52afe355
Original file line number Diff line number Diff line change
Expand Up @@ -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>(R Function() body) {
return runScoped(
body,
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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!'),
Expand Down Expand Up @@ -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));

Expand Down
2 changes: 2 additions & 0 deletions packages/shorebird_cli/lib/src/commands/preview_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 5 additions & 1 deletion packages/shorebird_cli/lib/src/shorebird_env.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
2 changes: 1 addition & 1 deletion packages/shorebird_cli/lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/shorebird_cli/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/shorebird_cli/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: shorebird_cli
description: Command-line tool to interact with Shorebird's services.
version: 0.27.0
version: 0.27.2
repository: https://github.com/shorebirdtech/shorebird

publish_to: none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand All @@ -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');
Expand Down
5 changes: 5 additions & 0 deletions packages/shorebird_cli/test/src/shorebird_env_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 65fa1db

Please sign in to comment.