mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-12-06 15:39:41 +00:00
43 lines
901 B
Dart
43 lines
901 B
Dart
import 'dart:async';
|
|
import 'dart:io';
|
|
|
|
import 'package:args/command_runner.dart';
|
|
import 'package:path/path.dart';
|
|
|
|
import 'common.dart';
|
|
|
|
class MacosBuildCommand extends Command with BuildCommandCommonSteps {
|
|
@override
|
|
String get description => "Macos Build command";
|
|
|
|
@override
|
|
String get name => "macos";
|
|
|
|
@override
|
|
FutureOr? run() async {
|
|
await bootstrap();
|
|
|
|
await shell.run(
|
|
"""
|
|
flutter build macos
|
|
appdmg appdmg.json ${join(cwd.path, "build", "Spotube-macos-universal.dmg")}
|
|
fastforge package --platform=macos --targets pkg --skip-clean
|
|
""",
|
|
);
|
|
|
|
final ogPkg = File(
|
|
join(
|
|
cwd.path,
|
|
"dist",
|
|
pubspec.version.toString(),
|
|
"spotube-${pubspec.version}-macos.pkg",
|
|
),
|
|
);
|
|
|
|
await ogPkg.copy(
|
|
join(cwd.path, "build", "Spotube-macos-universal.pkg"),
|
|
);
|
|
await ogPkg.delete();
|
|
}
|
|
}
|