feat(updates): switch auto-updates to GitHub releases and remove Gitea references (v3.0.1)
Build and Release / Build Windows x64 (push) Has been cancelled
Build and Release / Build Windows x64 (push) Has been cancelled
This commit is contained in:
@@ -46,25 +46,3 @@ jobs:
|
|||||||
files: ${{ env.ZIP_NAME }}
|
files: ${{ env.ZIP_NAME }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Upload Windows Zip to Gitea Release
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
$tag = "${{ github.ref_name }}"
|
|
||||||
if (-not $tag) { $tag = "v3.0.0" }
|
|
||||||
$token = "1c744d6044d756759d7b1f693c94c80cf70d75fa"
|
|
||||||
$giteaUrl = "https://gitea.rardogsynapse.online"
|
|
||||||
$repo = "RarDog/Lunaris"
|
|
||||||
$zipName = $env:ZIP_NAME
|
|
||||||
|
|
||||||
Write-Host "Fetching Gitea release info for tag $tag..."
|
|
||||||
$relUrl = "$giteaUrl/api/v1/repos/$repo/releases/tags/$tag"
|
|
||||||
$headers = @{ "Authorization" = "token $token" }
|
|
||||||
$rel = Invoke-RestMethod -Uri $relUrl -Headers $headers -Method Get
|
|
||||||
$releaseId = $rel.id
|
|
||||||
Write-Host "Found Gitea release ID: $releaseId"
|
|
||||||
|
|
||||||
$uploadUrl = "$giteaUrl/api/v1/repos/$repo/releases/$releaseId/assets?name=$zipName"
|
|
||||||
Write-Host "Uploading $zipName to $uploadUrl..."
|
|
||||||
curl.exe -X POST -H "Authorization: token $token" -F "attachment=@$zipName" $uploadUrl
|
|
||||||
Write-Host "Successfully uploaded Windows build to Gitea!"
|
|
||||||
|
|||||||
@@ -10,11 +10,10 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/RarDog/Lunaris/releases"><img src="https://img.shields.io/badge/Version-3.0.0-8A2BE2?style=for-the-badge&logo=semver&logoColor=white" alt="Version 3.0.0" /></a>
|
<a href="https://github.com/RarDog/Lunaris/releases"><img src="https://img.shields.io/badge/Version-3.0.1-8A2BE2?style=for-the-badge&logo=semver&logoColor=white" alt="Version 3.0.1" /></a>
|
||||||
<img src="https://img.shields.io/badge/Flutter-3.47+-02569B?style=for-the-badge&logo=flutter&logoColor=white" alt="Flutter" />
|
<img src="https://img.shields.io/badge/Flutter-3.47+-02569B?style=for-the-badge&logo=flutter&logoColor=white" alt="Flutter" />
|
||||||
<img src="https://img.shields.io/badge/Platform-Android%20%7C%20Linux%20%7C%20Windows-00C853?style=for-the-badge" alt="Platforms" />
|
<img src="https://img.shields.io/badge/Platform-Android%20%7C%20Linux%20%7C%20Windows-00C853?style=for-the-badge" alt="Platforms" />
|
||||||
<a href="https://github.com/RarDog/Lunaris/wiki"><img src="https://img.shields.io/badge/Wiki-Documentation-FF6F00?style=for-the-badge&logo=gitbook&logoColor=white" alt="Wiki" /></a>
|
<a href="https://github.com/RarDog/Lunaris/wiki"><img src="https://img.shields.io/badge/Wiki-Documentation-FF6F00?style=for-the-badge&logo=gitbook&logoColor=white" alt="Wiki" /></a>
|
||||||
<a href="https://gitea.rardogsynapse.online/RarDog/Lunaris"><img src="https://img.shields.io/badge/Gitea-RarDog%2FLunaris-FC6D26?style=for-the-badge&logo=gitea&logoColor=white" alt="Gitea" /></a>
|
|
||||||
<img src="https://img.shields.io/badge/License-MIT-blue?style=for-the-badge" alt="License MIT" />
|
<img src="https://img.shields.io/badge/License-MIT-blue?style=for-the-badge" alt="License MIT" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -82,7 +81,7 @@
|
|||||||
|
|
||||||
## 📥 Загрузка (Скачать сборки)
|
## 📥 Загрузка (Скачать сборки)
|
||||||
|
|
||||||
Релизы доступны на **[GitHub Releases](https://github.com/RarDog/Lunaris/releases)** и в личном репозитории **[Gitea Releases](https://gitea.rardogsynapse.online/RarDog/Lunaris/releases)**.
|
Релизы доступны на странице **[GitHub Releases](https://github.com/RarDog/Lunaris/releases)**.
|
||||||
|
|
||||||
| Платформа | Архитектура | Формат | Описание |
|
| Платформа | Архитектура | Формат | Описание |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
const appDisplayVersion = '2.3.1';
|
const appDisplayVersion = '3.0.1';
|
||||||
const appBuildNumber = 41;
|
const appBuildNumber = 52;
|
||||||
const appReleaseChannel = 'Stable';
|
const appReleaseChannel = 'Stable';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const lunarisChangelog = [
|
|||||||
'Новая архитектура поиска (OverlayPortal): подсказки тегов отображаются через нативный портал Flutter без блокировки кнопок панели, очистки и сброса фильтров.',
|
'Новая архитектура поиска (OverlayPortal): подсказки тегов отображаются через нативный портал Flutter без блокировки кнопок панели, очистки и сброса фильтров.',
|
||||||
'Pawchive 2.0 & Двусторонняя синхронизация: подключение аккаунтов через логин/пароль или Session Cookie, импорт избранного с сервера, экспорт локальных коллекций в аккаунт на сервере и сквозная синхронизация со всех поддерживаемых платформ.',
|
'Pawchive 2.0 & Двусторонняя синхронизация: подключение аккаунтов через логин/пароль или Session Cookie, импорт избранного с сервера, экспорт локальных коллекций в аккаунт на сервере и сквозная синхронизация со всех поддерживаемых платформ.',
|
||||||
'Ленивое автоопределение разрешения: фоновый декодер автоматически рассчитывает и выводит точные размеры медиа (например, 1920 × 1080) для постов Pawchive без серверных метаданных.',
|
'Ленивое автоопределение разрешения: фоновый декодер автоматически рассчитывает и выводит точные размеры медиа (например, 1920 × 1080) для постов Pawchive без серверных метаданных.',
|
||||||
'Умные per-ABI обновления: автообновление через Gitea скачивает точный APK под архитектуру вашего процессора (arm64-v8a, armeabi-v7a, x86_64), сокращая вес загрузки.',
|
'Умные per-ABI обновления: автообновление через GitHub скачивает точный APK под архитектуру вашего процессора (arm64-v8a, armeabi-v7a, x86_64), сокращая вес загрузки.',
|
||||||
'Исправление вёрстки: устранены переносы текста в заголовке окна аккаунтов и карточках пользователей на экранах смартфонов.',
|
'Исправление вёрстки: устранены переносы текста в заголовке окна аккаунтов и карточках пользователей на экранах смартфонов.',
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -36,7 +36,7 @@ const lunarisChangelog = [
|
|||||||
title: 'ABI-Aware Auto-Update — правильный APK для вашего процессора',
|
title: 'ABI-Aware Auto-Update — правильный APK для вашего процессора',
|
||||||
bullets: [
|
bullets: [
|
||||||
'Определение архитектуры Android: приложение читает Build.SUPPORTED_ABIS (arm64-v8a, armeabi-v7a, x86_64) через нативный канал.',
|
'Определение архитектуры Android: приложение читает Build.SUPPORTED_ABIS (arm64-v8a, armeabi-v7a, x86_64) через нативный канал.',
|
||||||
'Точный APK из Gitea: при обновлении скачивается per-ABI APK (app-arm64-v8a-release.apk и т.д.), а не один общий файл.',
|
'Точный APK из GitHub: при обновлении скачивается per-ABI APK (app-arm64-v8a-release.apk и т.д.), а не один общий файл.',
|
||||||
'Fallback: нет per-ABI APK → универсальный APK → страница релиза в браузере.',
|
'Fallback: нет per-ABI APK → универсальный APK → страница релиза в браузере.',
|
||||||
'Кеш ABI: архитектура определяется один раз за сеанс.',
|
'Кеш ABI: архитектура определяется один раз за сеанс.',
|
||||||
],
|
],
|
||||||
@@ -163,7 +163,7 @@ const lunarisChangelog = [
|
|||||||
'Instant Segmented Controls: replaced tedious dropdowns with fast 1-tap SegmentedButtons for Theme (Dark/Light/Auto), Language (RU/EN), and Media Quality (Auto/Data saver/HQ).',
|
'Instant Segmented Controls: replaced tedious dropdowns with fast 1-tap SegmentedButtons for Theme (Dark/Light/Auto), Language (RU/EN), and Media Quality (Auto/Data saver/HQ).',
|
||||||
'Folder Structure Bottom Sheet: intuitive download directory template picker with preset chips and custom pattern editor.',
|
'Folder Structure Bottom Sheet: intuitive download directory template picker with preset chips and custom pattern editor.',
|
||||||
'Interactive Stepper & Limit Controls: modernized desktop & mobile column steppers and disk cache limits with accent pill badges.',
|
'Interactive Stepper & Limit Controls: modernized desktop & mobile column steppers and disk cache limits with accent pill badges.',
|
||||||
'Hero Brand Banner: polished app presentation card in About section with glowing icon, version build badge, update checker, and Gitea repository link.',
|
'Hero Brand Banner: polished app presentation card in About section with glowing icon, version build badge, update checker, and GitHub repository link.',
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
LunarisChange(
|
LunarisChange(
|
||||||
@@ -301,7 +301,7 @@ const lunarisChangelog = [
|
|||||||
'Added favorite artists bar at the top of the Artists tab with quick access and recent photos/videos stream.',
|
'Added favorite artists bar at the top of the Artists tab with quick access and recent photos/videos stream.',
|
||||||
'Multi-image posts now feature an in-post navigation indicator with image switching.',
|
'Multi-image posts now feature an in-post navigation indicator with image switching.',
|
||||||
'New Pawchive provider support and cleaned up deprecated providers.',
|
'New Pawchive provider support and cleaned up deprecated providers.',
|
||||||
'In-app update checks and downloads connected directly to RarDog Gitea releases.',
|
'In-app update checks and downloads connected directly to RarDog GitHub releases.',
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
LunarisChange(
|
LunarisChange(
|
||||||
@@ -369,7 +369,7 @@ const lunarisChangelog = [
|
|||||||
version: '1.0.1',
|
version: '1.0.1',
|
||||||
title: 'Mobile polish',
|
title: 'Mobile polish',
|
||||||
bullets: [
|
bullets: [
|
||||||
'Startup update checks now look for new Gitea releases every launch.',
|
'Startup update checks now look for new GitHub releases every launch.',
|
||||||
'Refresh-rate controls are Android-only; desktop keeps stable app motion.',
|
'Refresh-rate controls are Android-only; desktop keeps stable app motion.',
|
||||||
'Tag chip input no longer jumps while typing.',
|
'Tag chip input no longer jumps while typing.',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ class UpdateService {
|
|||||||
UpdateService(this._dio, this._settingsService);
|
UpdateService(this._dio, this._settingsService);
|
||||||
|
|
||||||
static const latestReleaseUrl =
|
static const latestReleaseUrl =
|
||||||
'https://gitea.rardogsynapse.online/api/v1/repos/RarDog/Lunaris/releases/latest';
|
'https://api.github.com/repos/RarDog/Lunaris/releases/latest';
|
||||||
static const releasesUrl =
|
static const releasesUrl =
|
||||||
'https://gitea.rardogsynapse.online/api/v1/repos/RarDog/Lunaris/releases';
|
'https://api.github.com/repos/RarDog/Lunaris/releases';
|
||||||
|
|
||||||
static const _deviceChannel = MethodChannel('rulegel/device');
|
static const _deviceChannel = MethodChannel('rulegel/device');
|
||||||
|
|
||||||
@@ -84,7 +84,13 @@ class UpdateService {
|
|||||||
Future<AppUpdateInfo> _latestAllowedRelease(AppSettings settings) async {
|
Future<AppUpdateInfo> _latestAllowedRelease(AppSettings settings) async {
|
||||||
final response = await _dio.get<dynamic>(
|
final response = await _dio.get<dynamic>(
|
||||||
releasesUrl,
|
releasesUrl,
|
||||||
queryParameters: {'limit': 30},
|
queryParameters: {'per_page': 30},
|
||||||
|
options: Options(
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Lunaris-App',
|
||||||
|
'Accept': 'application/vnd.github+json',
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
final items = (response.data as List?) ?? const [];
|
final items = (response.data as List?) ?? const [];
|
||||||
final releases = items
|
final releases = items
|
||||||
@@ -95,7 +101,15 @@ class UpdateService {
|
|||||||
.map((item) => _releaseFromJson(Map<String, dynamic>.from(item)))
|
.map((item) => _releaseFromJson(Map<String, dynamic>.from(item)))
|
||||||
.toList(growable: false);
|
.toList(growable: false);
|
||||||
if (releases.isEmpty) {
|
if (releases.isEmpty) {
|
||||||
final latest = await _dio.get<dynamic>(latestReleaseUrl);
|
final latest = await _dio.get<dynamic>(
|
||||||
|
latestReleaseUrl,
|
||||||
|
options: Options(
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Lunaris-App',
|
||||||
|
'Accept': 'application/vnd.github+json',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
return _releaseFromJson(Map<String, dynamic>.from(latest.data as Map));
|
return _releaseFromJson(Map<String, dynamic>.from(latest.data as Map));
|
||||||
}
|
}
|
||||||
releases.sort((a, b) {
|
releases.sort((a, b) {
|
||||||
|
|||||||
@@ -2183,12 +2183,12 @@ class _HeroBrandBanner extends StatelessWidget {
|
|||||||
OutlinedButton.icon(
|
OutlinedButton.icon(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final url = Uri.parse(
|
final url = Uri.parse(
|
||||||
'https://gitea.rardogsynapse.online/RarDog/Lunaris',
|
'https://github.com/RarDog/Lunaris',
|
||||||
);
|
);
|
||||||
await launchUrl(url, mode: LaunchMode.externalApplication);
|
await launchUrl(url, mode: LaunchMode.externalApplication);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.code_rounded, size: 18),
|
icon: const Icon(Icons.code_rounded, size: 18),
|
||||||
label: const Text('Gitea'),
|
label: const Text('GitHub'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
name: gel_rule_app
|
name: gel_rule_app
|
||||||
description: Local backend/core layer for a Flutter booru browser app.
|
description: Local backend/core layer for a Flutter booru browser app.
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
version: 3.0.0+51
|
version: 3.0.1+52
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.3.0 <4.0.0"
|
sdk: ">=3.3.0 <4.0.0"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import 'package:gel_rule_app/backend/services/update_service.dart';
|
|||||||
import 'package:gel_rule_app/core/database/database_service.dart';
|
import 'package:gel_rule_app/core/database/database_service.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
test('UpdateService parses Gitea release JSON correctly', () {
|
test('UpdateService parses GitHub release JSON correctly', () {
|
||||||
final service = UpdateService(Dio(), SettingsService(_MockDatabaseService()));
|
final service = UpdateService(Dio(), SettingsService(_MockDatabaseService()));
|
||||||
|
|
||||||
// Use reflection or constructor to test info
|
// Use reflection or constructor to test info
|
||||||
@@ -15,21 +15,21 @@ void main() {
|
|||||||
tagName: 'v2.0.2',
|
tagName: 'v2.0.2',
|
||||||
name: 'Lunaris 2.0.2',
|
name: 'Lunaris 2.0.2',
|
||||||
body: 'Release notes',
|
body: 'Release notes',
|
||||||
htmlUrl: 'https://gitea.rardogsynapse.online/RarDog/Lunaris/releases/tag/v2.0.2',
|
htmlUrl: 'https://github.com/RarDog/Lunaris/releases/tag/v2.0.2',
|
||||||
publishedAt: DateTime.parse('2026-09-03T18:00:00Z'),
|
publishedAt: DateTime.parse('2026-09-03T18:00:00Z'),
|
||||||
apkUrl: 'https://gitea.rardogsynapse.online/attachments/apk',
|
apkUrl: 'https://github.com/RarDog/Lunaris/releases/download/v2.0.2/Lunaris.apk',
|
||||||
linuxTarGzUrl: 'https://gitea.rardogsynapse.online/attachments/linux',
|
linuxTarGzUrl: 'https://github.com/RarDog/Lunaris/releases/download/v2.0.2/linux.tar.gz',
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(info.hasAssets, isTrue);
|
expect(info.hasAssets, isTrue);
|
||||||
expect(info.apkUrl, contains('apk'));
|
expect(info.apkUrl, contains('apk'));
|
||||||
expect(info.linuxTarGzUrl, contains('linux'));
|
expect(info.linuxTarGzUrl, contains('linux'));
|
||||||
expect(
|
expect(
|
||||||
service.assetFileName(info, 'https://gitea.rardogsynapse.online/attachments/Lunaris-v2.0.2.apk'),
|
service.assetFileName(info, 'https://github.com/RarDog/Lunaris/releases/download/v2.0.2/Lunaris-v2.0.2.apk'),
|
||||||
'Lunaris-v2.0.2.apk',
|
'Lunaris-v2.0.2.apk',
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
service.assetFileName(info, info.apkUrl!),
|
service.assetFileName(info, 'https://github.com/RarDog/Lunaris/releases/download/v2.0.2/unknown-linux'),
|
||||||
'Lunaris-v2.0.2-linux-x64.tar.gz',
|
'Lunaris-v2.0.2-linux-x64.tar.gz',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user