mod: add buildconfig

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-29 17:56:55 +08:00
parent 90176a4787
commit 836f1a9b06
6 changed files with 54 additions and 4 deletions

View File

@@ -1 +1,16 @@
flutter build apk --target-platform android-arm64 --split-per-abi
#!/bin/bash
if [[ "$OSTYPE" == "darwin"* ]]; then
build_time=$(date -u -v+8H +"%Y-%m-%d %H:%M:%S")
else
build_time=$(date -u +"%Y-%m-%d %H:%M:%S" -d "+8 hours")
fi
commit_hash=$(git rev-parse HEAD)
cat <<EOL > lib/build_config.dart
class BuildConfig {
static const String buildTime = '$build_time';
static const String commitHash = '$commit_hash';
}
EOL