-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: certificate error by using custom ssl certificate * Cd/docker linux ar (#1468) * cd: use docker buildx * cd: use linux host for linux arm instead of macos m1 m1 doesn't support nested virtualization. (Apple truly sucks) * cd: don't specify arch in Dockerfile * cd: use custom Dockerfile from ubuntu instead of flutter image * cd: add setup java for android * cd: add flutter distributor pre-built docker image for arm * cd: save me from this cursed arm build * cd: ?? * cd: ?? * cd: use docker build * fix: windows SSL Exception for Signing in * refactor: extract update checker as a basic function instead of a hook
- Loading branch information
Showing
10 changed files
with
211 additions
and
150 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ build | |
dist | ||
.dart_tool | ||
.idea | ||
.github | ||
.git |
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 |
---|---|---|
@@ -1,32 +1,27 @@ | ||
ARG FLUTTER_VERSION | ||
ARG BUILD_VERSION | ||
|
||
FROM --platform=arm64 fischerscode/flutter-sudo:${FLUTTER_VERSION} | ||
FROM --platform=linux/arm64 krtirtho/flutter_distributor_arm64:${FLUTTER_VERSION} | ||
|
||
WORKDIR /app | ||
ARG BUILD_VERSION | ||
|
||
# Install dependencies | ||
RUN sudo apt-get update &&\ | ||
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 rpm &&\ | ||
sudo rm -rf /var/lib/apt/lists/* | ||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN sudo chown -R $(whoami) /app | ||
RUN chown -R $(whoami) /app | ||
|
||
RUN flutter pub get &&\ | ||
flutter config --enable-linux-desktop &&\ | ||
flutter pub get &&\ | ||
dart run build_runner build --delete-conflicting-outputs | ||
|
||
RUN dart pub global activate flutter_distributor &&\ | ||
alias dpkg-deb="dpkg-deb --Zxz" &&\ | ||
flutter_distributor package --platform=linux --targets=deb &&\ | ||
flutter_distributor package --platform=linux --targets=rpm | ||
RUN alias dpkg-deb="dpkg-deb --Zxz" &&\ | ||
flutter_distributor package --platform=linux --targets=deb | ||
|
||
|
||
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 &&\ | ||
mv dist/**/spotube-*-linux.rpm dist/Spotube-linux-aarch64.rpm | ||
mv dist/**/spotube-*-linux.deb dist/Spotube-linux-aarch64.deb | ||
|
||
CMD [ "sleep", "5000000" ] |
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,23 @@ | ||
FROM --platform=linux/arm64 ubuntu:22.04 | ||
|
||
ARG FLUTTER_VERSION | ||
|
||
RUN apt-get clean &&\ | ||
apt-get update &&\ | ||
apt-get install -y bash curl file git unzip xz-utils zip libglu1-mesa cmake tar clang 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 rpm && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /home/flutter | ||
|
||
RUN git clone https://github.com/flutter/flutter.git -b ${FLUTTER_VERSION} --single-branch flutter-sdk | ||
|
||
RUN flutter-sdk/bin/flutter precache | ||
|
||
RUN flutter-sdk/bin/flutter config --no-analytics | ||
|
||
ENV PATH="$PATH:/home/flutter/flutter-sdk/bin" | ||
ENV PATH="$PATH:/home/flutter/flutter-sdk/bin/cache/dart-sdk/bin" | ||
ENV PATH="$PATH:/home/flutter/.pub-cache/bin" | ||
ENV PUB_CACHE="/home/flutter/.pub-cache" | ||
|
||
RUN dart pub global activate flutter_distributor |
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,46 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:spotube/components/shared/links/anchor_button.dart'; | ||
import 'package:url_launcher/url_launcher_string.dart'; | ||
import 'package:version/version.dart'; | ||
|
||
class RootAppUpdateDialog extends StatelessWidget { | ||
final Version? version; | ||
const RootAppUpdateDialog({super.key, this.version}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
const url = "https://spotube.krtirtho.dev/downloads"; | ||
return AlertDialog( | ||
title: const Text("Spotube has an update"), | ||
actions: [ | ||
FilledButton( | ||
child: const Text("Download Now"), | ||
onPressed: () => launchUrlString( | ||
url, | ||
mode: LaunchMode.externalApplication, | ||
), | ||
), | ||
], | ||
content: Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
Text("Spotube v$version has been released"), | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
const Text("Read the latest "), | ||
AnchorButton( | ||
"release notes", | ||
style: const TextStyle(color: Colors.blue), | ||
onTap: () => launchUrlString( | ||
url, | ||
mode: LaunchMode.externalApplication, | ||
), | ||
), | ||
], | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.