Skip to content

Commit

Permalink
Merging from dart3a
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Feb 1, 2024
2 parents 6e58639 + da9ae3a commit 1833744
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 17 deletions.
2 changes: 2 additions & 0 deletions packages/appstore_publish/lib/appstore_publish.dart
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
library;

export 'src/appstore_publisher.dart' show AppStorePublisher;
39 changes: 39 additions & 0 deletions packages/appstore_publish/lib/src/appstore_publisher.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import 'package:process_run/process_run.dart';

/// Publisher for App Store Connect API
class AppStorePublisher {
/// App manager issuer id
final String issuerId;

/// App manager api key
final String apiKey;

/// Project path
final String path;

late final _shell = Shell(workingDirectory: path);
AppStorePublisher(
{required this.issuerId, required this.apiKey, required this.path});

/// Typically in build/ios/ipa/xxx.ipa
Future<void> validateIosApp({required String ipaPath}) async {
await _shell.run(
'xcrun altool --validate-app -f ${shellArgument(ipaPath)} -t ios --apiKey $apiKey --apiIssuer $issuerId');
}

Future<void> uploadIosApp({required String ipaPath}) async {
await _shell.run(
'xcrun altool --upload-app -f ${shellArgument(ipaPath)} -t ios --apiKey $apiKey --apiIssuer $issuerId');
}

/// Validate and upload ios app to TestFlight.
Future<void> validateAndUploadIosApp({required String ipaPath}) async {
await validateIosApp(ipaPath: ipaPath);
await uploadIosApp(ipaPath: ipaPath);
}

/// Kill validate or upload task
bool kill() {
return _shell.kill();
}
}
6 changes: 3 additions & 3 deletions packages/appstore_publish/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: tekartik_appstore_publish
description: A sample command-line application.
version: 0.1.0
description: IOS appstore publish
version: 0.1.1
publish_to: none

environment:
sdk: ^3.1.4

# Add regular dependencies here.
dependencies:
# path: ^1.8.0
process_run: '>=0.14.1+3'

dev_dependencies:
lints: '>=2.0.0'
Expand Down
4 changes: 2 additions & 2 deletions packages/firebase_build/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ environment:

dependencies:
path: '>=1.7.0'
process_run:
dev_build:
process_run: '>=0.10.2'
dev_build: '>=0.1.0'
tekartik_deploy:
git:
url: https://github.com/tekartik/deploy.dart
Expand Down
8 changes: 4 additions & 4 deletions packages/firebase_build_menu_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ environment:
sdk: '>=3.1.4 <4.0.0'

dependencies:
path:
dev_build:
process_run:
args:
path: '>=1.6.0'
dev_build: '>=0.1.0'
process_run: '>=0.10.2'
args: '>=2.4.2'
tekartik_firebase_build:
git:
url: https://github.com/tekartik/app_build.dart
Expand Down
6 changes: 3 additions & 3 deletions packages/playstore_publish/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ environment:

# Add regular dependencies here.
dependencies:
path:
args:
path: '>=1.6.0'
args: '>=2.4.2'
googleapis: '>=12.0.0'
googleapis_auth:
googleapis_auth: '>=1.4.1'
tekartik_io_auth_utils:
git:
url: https://github.com/tekartik/io_auth_utils.dart
Expand Down
10 changes: 5 additions & 5 deletions packages/repo_support/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ dev_dependencies:
ref: dart3a
path: packages/lints
version: '>=0.1.0'
path:
pub_semver:
path: '>=1.6.0'
pub_semver: '>=1.4.0'
process_run: '>=0.10.3'
test:
dev_build:
lints:
test: '>=1.16.0'
dev_build: '>=0.1.0'
lints: '>=2.0.0'

0 comments on commit 1833744

Please sign in to comment.