Adjust the download URL when on a different channel

This commit is contained in:
zontreck 2025-05-14 20:59:06 -07:00
parent 4504708df8
commit 061fd46f89
4 changed files with 5 additions and 5 deletions

View file

@ -1,3 +1,3 @@
{ {
"alpha": "1.0.0-dev.4" "alpha": "1.0.0-dev.5"
} }

View file

@ -3,9 +3,9 @@ import 'dart:convert';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
class TTConsts { class TTConsts {
static const UPDATE_URL = static get UPDATE_URL =>
"https://git.zontreck.com/AriasCreations/TimeTracker/raw/branch/main/latest-releases.json"; "https://git.zontreck.com/AriasCreations/TimeTracker/raw/branch/main/latest-releases.json";
static const VERSION = "1.0.0-dev.4"; static const VERSION = "1.0.0-dev.5";
static bool UPDATE_AVAILABLE = false; static bool UPDATE_AVAILABLE = false;
static UpdateChannel UPDATE_CHANNEL = UpdateChannel.alpha; static UpdateChannel UPDATE_CHANNEL = UpdateChannel.alpha;

View file

@ -76,7 +76,7 @@ class _UpdSet extends State<UpdateSettingsPage> {
onTap: () { onTap: () {
OtaUpdate() OtaUpdate()
.execute( .execute(
"https://ci.zontreck.com/job/Projects/job/Dart/job/Time%20Tracker/job/main/lastSuccessfulBuild/artifact/build/app/outputs/flutter-apk/timetrack.apk", "https://ci.zontreck.com/job/Projects/job/Dart/job/Time%20Tracker/job/${TTConsts.UPDATE_CHANNEL == UpdateChannel.stable ? "main" : TTConsts.UPDATE_CHANNEL}/lastSuccessfulBuild/artifact/build/app/outputs/flutter-apk/timetrack.apk",
destinationFilename: "timetrack.apk", destinationFilename: "timetrack.apk",
) )
.listen((OtaEvent event) { .listen((OtaEvent event) {

View file

@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.0-dev.4 version: 1.0.0-dev.5
environment: environment:
sdk: ^3.7.2 sdk: ^3.7.2