Skip to content

Commit 6365ac2

Browse files
committed
feat: Improved the build utility.
1 parent a073fc5 commit 6365ac2

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

bin/build.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,13 @@ void main() {
6868
stderr.writeln('Cannot find snap at "${snap.path}".');
6969
return;
7070
}
71-
stdout.writeln('Running `snapcraft upload --release=stable $snapName`...');
72-
Process.runSync('snapcraft', ['upload', '--release=stable', snapName], runInShell: true);
73-
stdout.writeln('Done.');
71+
stdout.writeln('Do you want to upload it ? (Y/N)');
72+
String yN = stdin.readLineSync() ?? '';
73+
if (yN.toLowerCase() == 'y') {
74+
stdout.writeln('Running `snapcraft upload --release=stable $snapName`...');
75+
Process.runSync('snapcraft', ['upload', '--release=stable', snapName], runInShell: true);
76+
stdout.writeln('Done.');
77+
}
7478
break;
7579
default:
7680
stderr.writeln('Invalid platform.');

0 commit comments

Comments
 (0)