-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tools): add script to update changelog with latest changes
- Loading branch information
1 parent
ac51803
commit 9c59c45
Showing
2 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import 'dart:convert'; | ||
import 'dart:io'; | ||
|
||
void main(List<String> args) { | ||
if (args.isEmpty) { | ||
print('🚨 Usage: dart update_changelog.dart <tag>'); | ||
exit(1); | ||
} | ||
|
||
final tag = args[0]; | ||
if (!tag.startsWith('v')) { | ||
print('❌ Tag must be in the format "vX.Y.Z".'); | ||
exit(1); | ||
} | ||
|
||
print('🚧 Starting changelog update for tag $tag...'); | ||
final result = Process.runSync( | ||
'dart', | ||
[ | ||
'run', | ||
'hooks:update_changelog', | ||
'--tag', | ||
tag, | ||
'--include-path', | ||
'packages/win32/**/*', | ||
'--repository', | ||
'../../' | ||
], | ||
stdoutEncoding: utf8, | ||
stderrEncoding: utf8, | ||
workingDirectory: Platform.script.resolve('../packages/win32').toFilePath(), | ||
); | ||
stdout.write(result.stdout); | ||
stderr.write(result.stderr); | ||
} |