Skip to content

Commit

Permalink
feat: change log
Browse files Browse the repository at this point in the history
Signed-off-by: CaiJingLong <[email protected]>
  • Loading branch information
CaiJingLong committed Mar 25, 2024
1 parent a8872f8 commit ff42c60
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/commiter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ class PkgCommiter {
void push() {
injectGh();

var res = execCmdResultSync('git pull');
if (res.exitCode != 0) {
error(res.stderr);
setFailed('git pull failed');
}

final result = execCmdResultSync('git push origin main');
if (result.exitCode != 0) {
error(result.stderr);
Expand Down
6 changes: 6 additions & 0 deletions lib/src/pub.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,11 @@ Future<void> publishPkg(
}

info(result.stdout.toString());

if (dryRun) {
info('Dry run publish ${pkg.name} success.');
return;
}

info('Publish ${pkg.name} ${pkg.version} success.');
}

0 comments on commit ff42c60

Please sign in to comment.