Skip to content
Snippets Groups Projects
Commit 9d484a4c authored by Maximilian Betz's avatar Maximilian Betz
Browse files

update yaml and get git hash

parent 9d354142
No related branches found
No related tags found
No related merge requests found
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'datamodel.dart';
import 'addevent.dart';
......@@ -7,11 +8,26 @@ import 'overview.dart';
import 'configuration.dart';
import 'databaseconnector.dart';
Future<String> getGitInfo() async {
final _head = await rootBundle.loadString('.git/HEAD');
final commitId = await rootBundle.loadString('.git/ORIG_HEAD');
final branch = _head.split('/').last;
print("Branch: $branch");
print("Commit ID: $commitId");
return "Branch: $branch, Commit ID: $commitId";
}
Future<void> loadConfiguration() async {
final ConfigurationStoreInstance configuration = ConfigurationStoreInstance();
final EventStoreInstance event = EventStoreInstance();
WidgetsFlutterBinding.ensureInitialized();
getGitInfo();
// Load conf and last event fields from shared preferences to prefill UI
await configuration.loadFromSharedPrefs();
await event.loadFromSharedPrefs();
......
......@@ -69,6 +69,9 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- assets/awi_logo.png
- .git/HEAD # This file points out the current branch of the project.
- .git/ORIG_HEAD # This file points to the commit id at origin (last commit id of the remote repository).
- .git/refs/heads/
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment