cd: fix copy linux command

This commit is contained in:
Kingkor Roy Tirtho 2024-05-07 20:55:34 +06:00
parent a7dcf47132
commit fe49085b41

View File

@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:io';
import 'package:io/io.dart';
import 'package:args/command_runner.dart';
import 'package:intl/intl.dart';
import 'package:path/path.dart';
@ -45,6 +46,9 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps {
final tempDir = Directory(join(Directory.systemTemp.path, "spotube-tar"))
..createSync(recursive: true);
final bundleDirPath =
join(cwd.path, "build", "linux", "x64", "release", "bundle", "*");
final tarPath = join(
cwd.path,
"build",
@ -52,9 +56,11 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps {
"${CliEnv.channel == BuildChannel.nightly ? "nightly" : versionWithoutBuildNumber}"
"-x86_64.tar.xz",
);
await copyPath(bundleDirPath, tempDir.path);
await shell.run(
"""
cp -r build/linux/x64/release/bundle/* ${tempDir.path}
cp ${join(cwd.path, "linux", "spotube.desktop")} ${tempDir.path}
cp ${join(cwd.path, "linux", "com.github.KRTirtho.Spotube.appdata.xml")} ${tempDir.path}
cp ${join(cwd.path, "assets", "spotube-logo.png")} ${tempDir.path}