Skip to content

Commit

Permalink
Set release number to git head
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Feb 25, 2024
1 parent cd19c95 commit ffab73a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ plugins {
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
}

include ":app"
include ":app"

import org.apache.tools.ant.DirectoryScanner

DirectoryScanner.removeDefaultExclude('**/.git')
DirectoryScanner.removeDefaultExclude('**/.git/**')
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Future<void> main() async {
await SentryHive.openBox<MoveList>('sequences');
await SentryHive.openBox<BaseStoredDevice>('devices');
await SentryFlutter.init(
(options) {
(options) async {
options.dsn = 'https://[email protected]/3';
options.addIntegration(LoggingIntegration());
options.attachScreenshot = true; //not supported on GlitchTip
Expand All @@ -108,6 +108,7 @@ Future<void> main() async {
options.enableAutoNativeBreadcrumbs = true;
options.enableAutoPerformanceTracing = true;
options.beforeSend = beforeSend;
options.release = (await rootBundle.loadString('.git/HEAD')).trim();
},
// Init your App.
appRunner: () => runApp(
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ dev_dependencies:
flutter:
uses-material-design: true
generate: true

assets:
- .git/HEAD
sentry:
upload_debug_symbols: true
upload_source_maps: true
Expand Down

0 comments on commit ffab73a

Please sign in to comment.