mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
add current commit of build to about
This commit is contained in:
parent
f1b0e4e119
commit
fc631bf866
6 changed files with 71 additions and 2 deletions
|
@ -10,6 +10,7 @@ abstract class AppConfig {
|
|||
static const suffix = _suffix;
|
||||
|
||||
static String get appDefaultDataDirName => _appDataDirName;
|
||||
static String get commitHash => _commitHash;
|
||||
|
||||
static ({String light, String dark})? get appIconAsset => _appIconAsset;
|
||||
|
||||
|
|
|
@ -134,6 +134,29 @@ class AboutView extends ConsumerWidget {
|
|||
const SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
RoundedWhiteContainer(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(
|
||||
"Build commit",
|
||||
style: STextStyles.titleBold12(context),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
SelectableText(
|
||||
GitStatus.appCommitHash,
|
||||
style:
|
||||
STextStyles.itemSubtitle(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
RoundedWhiteContainer(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
|
|
|
@ -207,7 +207,7 @@ class DesktopAboutView extends ConsumerWidget {
|
|||
],
|
||||
),
|
||||
const SizedBox(
|
||||
width: 64,
|
||||
width: 16,
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
@ -240,6 +240,40 @@ class DesktopAboutView extends ConsumerWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Build commit",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context,
|
||||
).copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.textDark,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
GitStatus.appCommitHash,
|
||||
style:
|
||||
STextStyles.itemSubtitle(
|
||||
context,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'package:lelantus/git_versions.dart' as firo_versions;
|
|||
import '../../../themes/stack_colors.dart';
|
||||
import '../../../utilities/logger.dart';
|
||||
import '../../../utilities/text_styles.dart';
|
||||
import '../app_config.dart';
|
||||
|
||||
const kGithubAPI = "https://api.github.com";
|
||||
const kGithubSearch = "/search/commits";
|
||||
|
@ -21,6 +22,8 @@ abstract class GitStatus {
|
|||
static String get epicCashCommit => epic_versions.getPluginVersion();
|
||||
static String get moneroCommit => monero_versions.getPluginVersion();
|
||||
|
||||
static String get appCommitHash => AppConfig.commitHash;
|
||||
|
||||
static CommitStatus? _cachedFiroStatus;
|
||||
static Future<CommitStatus> getFiroCommitStatus() async {
|
||||
if (_cachedFiroStatus != null) {
|
||||
|
|
|
@ -23,6 +23,10 @@ else
|
|||
sed -i "s/description: PLACEHOLDER/description: ${NEW_NAME}/g" "${PUBSPEC_FILE}"
|
||||
fi
|
||||
|
||||
pushd "${APP_PROJECT_ROOT_DIR}"
|
||||
BUILT_COMMIT_HASH=$(git log -1 --pretty=format:"%H")
|
||||
popd
|
||||
|
||||
APP_CONFIG_DART_FILE="${APP_PROJECT_ROOT_DIR}/lib/app_config.g.dart"
|
||||
rm -f "$APP_CONFIG_DART_FILE"
|
||||
cat << EOF > "$APP_CONFIG_DART_FILE"
|
||||
|
@ -34,6 +38,7 @@ const _prefix = "Stack";
|
|||
const _separator = " ";
|
||||
const _suffix = "Duo";
|
||||
const _appDataDirName = "stackduo";
|
||||
const _commitHash = "$BUILT_COMMIT_HASH";
|
||||
|
||||
const ({String light, String dark})? _appIconAsset = (
|
||||
light: "assets/in_app_logo_icons/stack-duo-icon_light.svg",
|
||||
|
|
|
@ -23,7 +23,9 @@ else
|
|||
sed -i "s/description: PLACEHOLDER/description: ${NEW_NAME}/g" "${PUBSPEC_FILE}"
|
||||
fi
|
||||
|
||||
|
||||
pushd "${APP_PROJECT_ROOT_DIR}"
|
||||
BUILT_COMMIT_HASH=$(git log -1 --pretty=format:"%H")
|
||||
popd
|
||||
|
||||
APP_CONFIG_DART_FILE="${APP_PROJECT_ROOT_DIR}/lib/app_config.g.dart"
|
||||
rm -f "$APP_CONFIG_DART_FILE"
|
||||
|
@ -36,6 +38,7 @@ const _prefix = "Stack";
|
|||
const _separator = " ";
|
||||
const _suffix = "Wallet";
|
||||
const _appDataDirName = "stackwallet";
|
||||
const _commitHash = "$BUILT_COMMIT_HASH";
|
||||
|
||||
const ({String light, String dark})? _appIconAsset = null;
|
||||
|
||||
|
|
Loading…
Reference in a new issue