Skip to content

Commit

Permalink
Updated release and build.
Browse files Browse the repository at this point in the history
  • Loading branch information
DrRetro2033 committed Dec 23, 2024
1 parent a280ee7 commit 93974bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- os: ubuntu-latest
platform: linux
output: arceus.elf
add-command: "cp --force ./src/squirrel3/bin/Debug/libsquirrel.so ./scripts/installers/linux/lib/squirrel.so && cp -r ./scripts/installers/linux/ ./build/releases/"
add-command: "cp --force ./src/squirrel3/bin/Debug/lib/squirrel.so ./scripts/installers/linux/lib/squirrel.so && cp -r ./scripts/installers/linux/ ./build/releases/"
- os: windows-latest
platform: windows
output: arceus.exe
Expand Down
14 changes: 11 additions & 3 deletions scripts/release.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ Future<void> main(List<String> args) async {
print('Usage: dart release.dart <path-to-project>');
exit(1);
}
final pathOfProject = args.first;
bool draft = false;
final pathOfProject =
args.firstWhere((element) => !element.startsWith('--'), orElse: () => '');
if (args.contains('--draft')) {
draft = true;
}
if (!Directory(pathOfProject).existsSync()) {
print('Error: Directory not found: $pathOfProject');
exit(1);
Expand Down Expand Up @@ -94,8 +99,11 @@ Future<void> main(List<String> args) async {
'name':
'v${loadYaml(File("$pathOfProject/pubspec.yaml").readAsStringSync())['version']}',
'body': File('$pathOfProject/CHANGELOG.md').readAsStringSync(),
'draft': true,
'prerelease': true,
'draft': draft,
'prerelease':
(loadYaml(File("$pathOfProject/pubspec.yaml").readAsStringSync())[
'version'] as String)
.contains("alpha"),
}),
);

Expand Down

0 comments on commit 93974bc

Please sign in to comment.