From 06b258cff12bfa716ba677f28ecb1e61a17c31c2 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Mon, 29 Sep 2025 17:56:35 +0800 Subject: [PATCH] build Signed-off-by: bggRGjQaUbCoE --- .github/workflows/android.yml | 2 +- lib/scripts/build.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index af9a2790a..9685c1925 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -67,7 +67,7 @@ jobs: - name: flutter build apk run: | chmod +x lib/scripts/build.dart - dart lib/scripts/build.dart + dart lib/scripts/build.dart "true" flutter build apk --release --split-per-abi - name: 上传 diff --git a/lib/scripts/build.dart b/lib/scripts/build.dart index ddbaebd61..c07edfcd3 100644 --- a/lib/scripts/build.dart +++ b/lib/scripts/build.dart @@ -1,6 +1,6 @@ import 'dart:io'; -void main() async { +void main(Iterable args) async { final pubspecFile = File('pubspec.yaml'); final lines = await pubspecFile.readAsLines(); @@ -18,7 +18,7 @@ void main() async { 'HEAD', ])).stdout.toString().trim(); - if (Platform.isLinux) { + if (args.isNotEmpty) { versionName += '-${commitHash.substring(0, 9)}'; }