mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-12-05 23:19:42 +00:00
cd: add appimage support and use fastforge
This commit is contained in:
parent
11866d532b
commit
a452122302
25
.github/Dockerfile
vendored
25
.github/Dockerfile
vendored
@ -1,25 +0,0 @@
|
||||
ARG FLUTTER_VERSION
|
||||
|
||||
FROM --platform=linux/arm64 krtirtho/flutter_distributor:${FLUTTER_VERSION}
|
||||
|
||||
ARG BUILD_VERSION
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN chown -R $(whoami) /app
|
||||
|
||||
RUN rustup target add aarch64-unknown-linux-gnu
|
||||
|
||||
RUN flutter pub get
|
||||
|
||||
RUN alias dpkg-deb="dpkg-deb --Zxz" &&\
|
||||
flutter_distributor package --platform=linux --targets=deb --skip-clean
|
||||
|
||||
RUN make tar VERSION=${BUILD_VERSION} ARCH=arm64 PKG_ARCH=aarch64
|
||||
|
||||
RUN mv build/spotube-linux-*-aarch64.tar.xz dist/ &&\
|
||||
mv dist/**/spotube-*-linux.deb dist/Spotube-linux-aarch64.deb
|
||||
|
||||
CMD [ "sleep", "5000000" ]
|
||||
3
.github/workflows/spotube-release-binary.yml
vendored
3
.github/workflows/spotube-release-binary.yml
vendored
@ -36,13 +36,14 @@ jobs:
|
||||
arch: x86
|
||||
files: |
|
||||
dist/Spotube-linux-x86_64.deb
|
||||
dist/Spotube-linux-x86_64.rpm
|
||||
dist/Spotube-linux-x86_64.AppImage
|
||||
dist/spotube-linux-*-x86_64.tar.xz
|
||||
- os: ubuntu-22.04-arm
|
||||
platform: linux
|
||||
arch: arm64
|
||||
files: |
|
||||
dist/Spotube-linux-aarch64.deb
|
||||
dist/Spotube-linux-aarch64.AppImage
|
||||
dist/spotube-linux-*-aarch64.tar.xz
|
||||
- os: ubuntu-22.04
|
||||
platform: android
|
||||
|
||||
@ -59,7 +59,7 @@ mixin BuildCommandCommonSteps on Command {
|
||||
"""
|
||||
flutter pub get
|
||||
dart run build_runner build --delete-conflicting-outputs
|
||||
dart pub global activate flutter_distributor
|
||||
dart pub global activate fastforge
|
||||
""",
|
||||
);
|
||||
}
|
||||
|
||||
@ -37,15 +37,9 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps {
|
||||
await bootstrap();
|
||||
|
||||
await shell.run(
|
||||
"flutter_distributor package --platform=linux --targets=deb",
|
||||
"fastforge package --platform=linux --targets=deb,appimage",
|
||||
);
|
||||
|
||||
if (architecture == "x86") {
|
||||
await shell.run(
|
||||
"flutter_distributor package --platform=linux --targets=rpm",
|
||||
);
|
||||
}
|
||||
|
||||
final tempDir = join(Directory.systemTemp.path, "spotube-tar");
|
||||
final bundleArchName = architecture == "x86" ? "x86_64" : "aarch64";
|
||||
final bundleDirPath = join(
|
||||
@ -99,22 +93,22 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps {
|
||||
);
|
||||
await ogDeb.delete();
|
||||
|
||||
if (architecture == "x86") {
|
||||
final ogRpm = File(
|
||||
final ogAppImage = File(
|
||||
join(
|
||||
cwd.path,
|
||||
"dist",
|
||||
pubspec.version.toString(),
|
||||
"spotube-${pubspec.version}-linux.rpm",
|
||||
"spotube-${pubspec.version}-linux.AppImage",
|
||||
),
|
||||
);
|
||||
|
||||
await ogRpm.copy(
|
||||
join(cwd.path, "dist", "Spotube-linux-$bundleArchName.rpm"),
|
||||
await ogAppImage.copy(
|
||||
join(
|
||||
cwd.path,
|
||||
"dist",
|
||||
"Spotube-linux-$bundleArchName.AppImage",
|
||||
),
|
||||
);
|
||||
|
||||
await ogRpm.delete();
|
||||
}
|
||||
await ogAppImage.delete();
|
||||
|
||||
stdout.writeln("✅ Linux building done");
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ class MacosBuildCommand extends Command with BuildCommandCommonSteps {
|
||||
"""
|
||||
flutter build macos
|
||||
appdmg appdmg.json ${join(cwd.path, "build", "Spotube-macos-universal.dmg")}
|
||||
flutter_distributor package --platform=macos --targets pkg --skip-clean
|
||||
fastforge package --platform=macos --targets pkg --skip-clean
|
||||
""",
|
||||
);
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ class WindowsBuildCommand extends Command with BuildCommandCommonSteps {
|
||||
);
|
||||
|
||||
await shell.run(
|
||||
"flutter_distributor package --platform=windows --targets=exe --skip-clean",
|
||||
"fastforge package --platform=windows --targets=exe --skip-clean",
|
||||
);
|
||||
|
||||
final ogExe = File(
|
||||
|
||||
@ -37,6 +37,8 @@ class InstallDependenciesCommand extends Command {
|
||||
FutureOr? run() async {
|
||||
final shell = Shell();
|
||||
|
||||
final arch = argResults?.option("arch") == "x86" ? "x86_64" : "aarch64";
|
||||
|
||||
switch (argResults!.option("platform")) {
|
||||
case "windows":
|
||||
await shell.run(
|
||||
@ -49,7 +51,10 @@ class InstallDependenciesCommand extends Command {
|
||||
await shell.run(
|
||||
"""
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y tar clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse libunwind-dev locate patchelf gir1.2-appindicator3-0.1 libappindicator3-1 libappindicator3-dev libsecret-1-0 libjsoncpp25 libsecret-1-dev libjsoncpp-dev libnotify-bin libnotify-dev mpv libmpv-dev libwebkit2gtk-4.1-0 libwebkit2gtk-4.1-dev libsoup-3.0-0 libsoup-3.0-dev
|
||||
sudo apt-get install -y wget tar clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse libunwind-dev locate patchelf gir1.2-appindicator3-0.1 libappindicator3-1 libappindicator3-dev libsecret-1-0 libjsoncpp25 libsecret-1-dev libjsoncpp-dev libnotify-bin libnotify-dev mpv libmpv-dev libwebkit2gtk-4.1-0 libwebkit2gtk-4.1-dev libsoup-3.0-0 libsoup-3.0-dev
|
||||
wget -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$arch.AppImage"
|
||||
chmod +x appimagetool
|
||||
sudo mv appimagetool /usr/local/bin/
|
||||
""",
|
||||
);
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user