mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00

* feat: add build dart script for windows * feat: add android build support * feat: add linux build support * feat: add macos build support * feat: add ios build support * feat: add deps install command and workflow file * cd: what? * cd: what? * cd: what? * cd: update workflow inputs * cd: replace release binary * cd: run flutter pub get * cd: use dpkg zstd instead of xz, windows disable innoInstall, fix channel enum.name and reset pubspec after changing build no for nightly * cd: fix tar copy path * cd: fix copy linux command * cd: fix windows inno depend and fix android aab path * cd: idk * cd: linux why??? * cd: windows choco copy failed * cd: use dart tar archive for creating tar file * cd: fix linux file copy error * cd: use tar command directly * feat: add linux_arm platform * cd: add linux_arm platform * cd: don't know what? * feat: notification about nightly channel update * chore: fix some errors parsing nightly version info
25 lines
667 B
Dart
25 lines
667 B
Dart
import 'dart:io';
|
|
|
|
enum BuildChannel {
|
|
stable,
|
|
nightly;
|
|
|
|
factory BuildChannel.fromEnvironment(String name) {
|
|
final channel = Platform.environment[name]!;
|
|
if (channel == "stable") {
|
|
return BuildChannel.stable;
|
|
} else if (channel == "nightly") {
|
|
return BuildChannel.nightly;
|
|
} else {
|
|
throw Exception("Invalid channel: $channel");
|
|
}
|
|
}
|
|
}
|
|
|
|
class CliEnv {
|
|
static final channel = BuildChannel.fromEnvironment("CHANNEL");
|
|
static final dotenv = Platform.environment["DOTENV"]!;
|
|
static final ghRunNumber = Platform.environment["GITHUB_RUN_NUMBER"];
|
|
static final flutterVersion = Platform.environment["FLUTTER_VERSION"]!;
|
|
}
|