Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo runProcessSucessfullyOrThrow in Sharezone Repo CLI #1007

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Future<void> analyzePackage(Package package) async {
}

Future<void> _runDartAnalyze(Package package) {
return runProcessSucessfullyOrThrow(
return runProcessSuccessfullyOrThrow(
'fvm', ['dart', 'analyze', '--fatal-infos', '--fatal-warnings'],
workingDirectory: package.path);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ When none is specified, the value from pubspec.yaml is used.''',
final buildNumber = argResults![buildNumberOptionName] as String?;
final buildNameWithStage =
getBuildNameWithStage(_repo.sharezoneFlutterApp, stage);
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'flutter',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ When none is specified, the value from pubspec.yaml is used.''',
final stage = argResults![releaseStageOptionName] as String;
final buildNumber = argResults![buildNumberOptionName] as String?;
final exportOptionsPlist = argResults![exportOptionsPlistName] as String?;
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'flutter',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ When none is specified, the value from pubspec.yaml is used.''',
const flavor = 'prod';
final stage = argResults![releaseStageOptionName] as String;
final buildNumber = argResults![buildNumberOptionName] as String?;
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'flutter',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class BuildRunnerBuild extends ConcurrentCommand {

@override
Future<void> runTaskForPackage(Package package) async {
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'dart',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class BuildWebCommand extends Command {
final stage = argResults![releaseStageOptionName] as String;
final buildNameWithStage =
getBuildNameWithStage(_repo.sharezoneFlutterApp, stage);
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'flutter',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class DeployAndroidCommand extends Command {
///
/// See https://docs.fastlane.tools/actions/validate_play_store_json_key
Future<void> _checkIfGooglePlayCredentialsAreValid() async {
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fastlane',
['run', 'validate_play_store_json_key'],
workingDirectory: '${_repo.sharezoneFlutterApp.location.path}/android',
Expand Down Expand Up @@ -132,7 +132,7 @@ class DeployAndroidCommand extends Command {
try {
final flavor = argResults![flavorOptionName] as String;
final stage = argResults![releaseStageOptionName] as String;
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'dart',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class DeployIosCommand extends Command {
final flavor = argResults![flavorOptionName] as String;
final stage = argResults![releaseStageOptionName] as String;
final exportOptionsPlist = argResults![exportOptionsPlistName] as String?;
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'dart',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class DeployMacOsCommand extends Command {
Future<void> _buildApp({required int buildNumber}) async {
try {
final stage = argResults![releaseStageOptionName] as String;
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'dart',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class DeployWebAppCommand extends Command {
final releaseStage = _parseReleaseStage(argResults!);
final webAppConfig = _getMatchingWebAppConfig(releaseStage);

await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'dart',
Expand All @@ -105,7 +105,7 @@ class DeployWebAppCommand extends Command {
deployMessage = 'Commit: $currentCommit';
}

await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'firebase',
[
'deploy',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Future<void> formatCode(
/// Useful for code analysis in CI.
bool throwIfCodeChanged = false,
}) {
return runProcessSucessfullyOrThrow(
return runProcessSuccessfullyOrThrow(
'fvm',
[
'dart',
Expand Down
4 changes: 2 additions & 2 deletions tools/sz_repo_cli/lib/src/commands/src/pub_get_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ Future<void> getPackage(Package package) async {
}

Future<void> getPackagesDart(Package package) async {
await runProcessSucessfullyOrThrow('fvm', ['dart', 'pub', 'get'],
await runProcessSuccessfullyOrThrow('fvm', ['dart', 'pub', 'get'],
workingDirectory: package.path);
}

Future<void> getPackagesFlutter(Package package) async {
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
['flutter', 'pub', 'get'],
workingDirectory: package.path,
Expand Down
8 changes: 4 additions & 4 deletions tools/sz_repo_cli/lib/src/commands/src/test_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Future<void> _runTestsDart(

await getPackage(package);

await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
['dart', 'test'],
workingDirectory: package.path,
Expand All @@ -125,7 +125,7 @@ Future<void> _runTestsFlutter(
return;
}

await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'flutter',
Expand All @@ -142,7 +142,7 @@ Future<void> _runTestsFlutter(
// command. Otherwise the throws the Flutter tool throws an error that it
// couldn't find the "test_goldens" directory.
if (excludeGoldens || !package.hasGoldenTestsDirectory) {
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
['flutter', 'test'],
workingDirectory: package.path,
Expand All @@ -153,7 +153,7 @@ Future<void> _runTestsFlutter(
/// Flutter test lässt automatisch flutter pub get laufen.
/// Deswegen muss nicht erst noch [getPackages] aufgerufen werden.

await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'fvm',
[
'flutter',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ Future<void> setUpSigning({
/// [keychainUseLogin]) after the deployment to avoid potential authentication
/// issues if you run the deployment on your local machine.
Future<void> _keychainInitialize() async {
await runProcessSucessfullyOrThrow('keychain', ['initialize']);
await runProcessSuccessfullyOrThrow('keychain', ['initialize']);
}

/// Fetch the code signing files from App Store Connect.
Future<void> _fetchSigningFiles({
required AppleSigningConfig config,
}) async {
const bundleId = 'de.codingbrain.sharezone';
await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'app-store-connect',
[
'fetch-signing-files',
Expand All @@ -69,12 +69,12 @@ Future<void> _fetchSigningFiles({

/// Adds the certificates to the keychain.
Future<void> _keychainAddCertificates() async {
await runProcessSucessfullyOrThrow('keychain', ['add-certificates']);
await runProcessSuccessfullyOrThrow('keychain', ['add-certificates']);
}

/// Update the Xcode project settings to use fetched code signing profiles.
Future<void> _xcodeProjectUseProfiles() async {
await runProcessSucessfullyOrThrow('xcode-project', ['use-profiles']);
await runProcessSuccessfullyOrThrow('xcode-project', ['use-profiles']);
}

/// Sets your login keychain as the default to avoid potential authentication
Expand All @@ -84,7 +84,7 @@ Future<void> _xcodeProjectUseProfiles() async {
/// and have previously used the `keychain initialize' command. If you run it on
/// a CI server, this step is not necessary.
Future<void> keychainUseLogin() async {
await runProcessSucessfullyOrThrow('keychain', ['use-login']);
await runProcessSuccessfullyOrThrow('keychain', ['use-login']);
}

Future<int> getNextBuildNumberFromAppStoreConnect({
Expand Down Expand Up @@ -112,7 +112,7 @@ Future<int> _getLatestBuildNumberFromAppStoreConnect({
// From https://appstoreconnect.apple.com/apps/1434868489/
const appId = 1434868489;

final result = await runProcessSucessfullyOrThrow(
final result = await runProcessSuccessfullyOrThrow(
'app-store-connect',
[
'get-latest-build-number',
Expand Down Expand Up @@ -148,7 +148,7 @@ Future<void> publishToAppStoreConnect({
stageToTracks: stageToTracks,
);

await runProcessSucessfullyOrThrow(
await runProcessSuccessfullyOrThrow(
'app-store-connect',
[
'publish',
Expand Down
2 changes: 1 addition & 1 deletion tools/sz_repo_cli/lib/src/common/src/run_process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import '../common.dart';

/// Helper method that automatically throws if [Process.exitCode] is non-zero
/// (unsucessfull).
Future<ProcessResult> runProcessSucessfullyOrThrow(
Future<ProcessResult> runProcessSuccessfullyOrThrow(
String executable,
List<String> arguments, {
String? workingDirectory,
Expand Down