feat(shorebird_cli): add release instructions to shorebird release ios (#627)

This commit is contained in:
Bryan Oltman
2023-06-12 10:48:52 -04:00
committed by GitHub
parent 39b34dab5a
commit a70866bee9
2 changed files with 47 additions and 11 deletions
@@ -89,18 +89,17 @@ make smaller updates to your app.
buildProgress.complete();
final releaseVersionProgress = logger.progress('Getting release version');
final pubspec = getPubspecYaml()!;
final ipaPath = p.join(
Directory.current.path,
'build',
'ios',
'ipa',
'${pubspec.name}.ipa',
);
String releaseVersion;
try {
final pubspec = getPubspecYaml()!;
final ipa = _ipaReader.read(
p.join(
Directory.current.path,
'build',
'ios',
'ipa',
'${pubspec.name}.ipa',
),
);
final ipa = _ipaReader.read(ipaPath);
releaseVersion = ipa.versionNumber;
} catch (error) {
releaseVersionProgress.fail(
@@ -166,7 +165,20 @@ Please bump your version number and try again.''',
flutterRevision: shorebirdFlutterRevision,
);
logger.success('\n✅ Published Release!');
final relativeIpaPath = p.relative(ipaPath);
logger
..success('\n✅ Published Release!')
..info('''
Your next step is to upload the ipa to App Store Connect.
${lightCyan.wrap(relativeIpaPath)}
To upload to the App Store either:
1. Drag and drop the "$relativeIpaPath" bundle into the Apple Transporter macOS app (https://apps.apple.com/us/app/transporter/id1450874784)
2. Run ${lightCyan.wrap('xcrun altool --upload-app --type ios -f $relativeIpaPath --apiKey your_api_key --apiIssuer your_issuer_id')}.
See "man altool" for details about how to authenticate with the App Store Connect API key.
''');
return ExitCode.success.code;
}
@@ -432,6 +432,18 @@ Please bump your version number and try again.'''),
);
verify(() => logger.success('\n✅ Published Release!')).called(1);
verify(
() => logger.info(
any(
that: stringContainsInOrder(
[
'Your next step is to upload the ipa to App Store Connect.',
'build/ios/ipa/example.ipa',
],
),
),
),
).called(1);
expect(exitCode, ExitCode.success.code);
});
@@ -456,6 +468,18 @@ flavors:
);
verify(() => logger.success('\n✅ Published Release!')).called(1);
verify(
() => logger.info(
any(
that: stringContainsInOrder(
[
'Your next step is to upload the ipa to App Store Connect.',
'build/ios/ipa/example.ipa',
],
),
),
),
).called(1);
expect(exitCode, ExitCode.success.code);
});
});