opt buildTime

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-18 18:17:36 +08:00
parent 91a1b77d83
commit 768f3e20b1
4 changed files with 13 additions and 16 deletions

View File

@@ -1,16 +1,11 @@
#!/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
build_time=$(date +%s)
commit_hash=$(git rev-parse HEAD)
cat <<EOL > lib/build_config.dart
class BuildConfig {
static const String buildTime = '$build_time';
static const int buildTime = $build_time;
static const String commitHash = '$commit_hash';
}
EOL