show git commit in about dialog
This commit is contained in:
parent
64a8edda7d
commit
a63d182c50
7 changed files with 42 additions and 34 deletions
2
.github/workflows/android.yml
vendored
2
.github/workflows/android.yml
vendored
|
|
@ -27,7 +27,7 @@ jobs:
|
||||||
KEYSTORE_CONTENT: ${{ secrets.KEYSTORE_CONTENT }}
|
KEYSTORE_CONTENT: ${{ secrets.KEYSTORE_CONTENT }}
|
||||||
|
|
||||||
- name: Build app
|
- name: Build app
|
||||||
run: nix develop --command bash -c "flutter pub get && dart scripts/generate.dart && flutter pub run build_runner build && flutter build apk --target-platform android-arm64"
|
run: nix develop --command bash -c "flutter pub get && dart scripts/generate.dart && flutter pub run build_runner build && flutter build apk --target-platform android-arm64 --dart-define=GIT_COMMIT=${{ github.sha }}"
|
||||||
env:
|
env:
|
||||||
KEYSTORE_PATH: ../../keystore.jks
|
KEYSTORE_PATH: ../../keystore.jks
|
||||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||||
|
|
|
||||||
2
.github/workflows/ios.yml
vendored
2
.github/workflows/ios.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
flutter pub get
|
flutter pub get
|
||||||
dart scripts/generate.dart
|
dart scripts/generate.dart
|
||||||
flutter pub run build_runner build
|
flutter pub run build_runner build
|
||||||
flutter build ios --release --no-codesign
|
flutter build ios --no-codesign --dart-define=GIT_COMMIT=${{ github.sha }}
|
||||||
|
|
||||||
# Unsigned IPA: SideStore/AltStore re-sign this on-device with the
|
# Unsigned IPA: SideStore/AltStore re-sign this on-device with the
|
||||||
# user's own Apple ID at install time, so no certificate is needed here.
|
# user's own Apple ID at install time, so no certificate is needed here.
|
||||||
|
|
|
||||||
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
flutter pub get
|
flutter pub get
|
||||||
dart scripts/generate.dart
|
dart scripts/generate.dart
|
||||||
flutter pub run build_runner build
|
flutter pub run build_runner build
|
||||||
flutter build macos --release
|
flutter build macos --dart-define=GIT_COMMIT=${{ github.sha }}
|
||||||
|
|
||||||
- name: Create DMG
|
- name: Create DMG
|
||||||
id: create-dmg
|
id: create-dmg
|
||||||
|
|
|
||||||
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
|
|
@ -43,7 +43,7 @@ jobs:
|
||||||
flutter pub get
|
flutter pub get
|
||||||
dart scripts/generate.dart
|
dart scripts/generate.dart
|
||||||
flutter pub run build_runner build
|
flutter pub run build_runner build
|
||||||
flutter build windows --release
|
flutter build windows --dart-define=GIT_COMMIT=${{ github.sha }}
|
||||||
|
|
||||||
- name: Copy MinGW runtime DLLs
|
- name: Copy MinGW runtime DLLs
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,9 @@ extension ShowAboutDialog on BuildContext {
|
||||||
"Nexus",
|
"Nexus",
|
||||||
style: Theme.of(context).textTheme.headlineMedium,
|
style: Theme.of(context).textTheme.headlineMedium,
|
||||||
),
|
),
|
||||||
Text("(${packageInfo.version})"),
|
Text(
|
||||||
|
"(${packageInfo.version}+${const String.fromEnvironment("GIT_COMMIT", defaultValue: "dev")})",
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
let
|
let
|
||||||
default = pkgs.callPackage ./pkg {
|
default = pkgs.callPackage ./pkg {
|
||||||
src = self;
|
src = self;
|
||||||
|
commit = self.shortRev or self.dirtyShortRev;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
libclang,
|
libclang,
|
||||||
flutter,
|
flutter,
|
||||||
src,
|
src,
|
||||||
|
commit ? "dev",
|
||||||
}:
|
}:
|
||||||
|
|
||||||
flutter.buildFlutterApplication {
|
flutter.buildFlutterApplication {
|
||||||
|
|
@ -19,6 +20,10 @@ flutter.buildFlutterApplication {
|
||||||
packageRun build_runner build
|
packageRun build_runner build
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
flutterBuildFlags = [
|
||||||
|
"--dart-define=GIT_COMMIT=${commit}"
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
mpv-unwrapped
|
mpv-unwrapped
|
||||||
libass
|
libass
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue