Skip to content

Commit

Permalink
feat: added support to download serivce account for the playstore
Browse files Browse the repository at this point in the history
  • Loading branch information
vanlooverenkoen committed Dec 11, 2023
1 parent c20f2ff commit 254a07b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.7.0

# Feat:
- Added `getServiceAccountCredentials` to `OnePasswordPlugin` to get google service account credentials from 1password.

# 0.6.1

# Fix:
Expand Down
19 changes: 17 additions & 2 deletions lib/src/integrations/one_password/plugin/one_password_plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class OnePasswordPlugin extends ImpaktfullCliPlugin {
required super.processRunner,
});

Future<File> downloadDistributionCertificate({
Future<File> downloadFile({
required String opUuid,
String outputPath = 'certificates/apple_distribution.p12',
required String outputPath,
}) async {
final exportFile = File(outputPath);
await processRunner.runProcess([
Expand Down Expand Up @@ -50,6 +50,15 @@ class OnePasswordPlugin extends ImpaktfullCliPlugin {
processRunner
.runProcess(['op', 'read', 'op://$vaultName/$opUuid/$fieldName']);

Future<File> downloadDistributionCertificate({
required String opUuid,
String outputPath = 'certificates/apple_distribution.p12',
}) =>
downloadFile(
opUuid: opUuid,
outputPath: outputPath,
);

Future<TestFlightCredentials> getTestFlightCredentials({
required String vaultName,
required String opUuid,
Expand All @@ -66,4 +75,10 @@ class OnePasswordPlugin extends ImpaktfullCliPlugin {
fieldName: 'password',
),
);

Future<File> getServiceAccountCredentials({
required String opUuid,
String outputPath = 'android/playstore_credentials.json',
}) async =>
downloadFile(opUuid: opUuid, outputPath: outputPath);
}

0 comments on commit 254a07b

Please sign in to comment.