Skip to content

Commit

Permalink
read version from pubspec.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
juri117 committed Jun 16, 2023
1 parent 14fc1b4 commit ef1f73f
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 2 deletions.
1 change: 1 addition & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**features:**
* [x] allow environment variable setup
* [x] add config value `maxLogLines` for max. number of log lines
* [x] read version from pubspec.yaml

**bug-fixes:**
* [x] fix bug in log list trim
Expand Down
10 changes: 8 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:package_info_plus/package_info_plus.dart';

import 'package:flutter/material.dart';
import 'package:multi_split_view/multi_split_view.dart';
import 'package:task_launcher/log_view.dart';
import 'package:task_launcher/models/task.dart';
import 'package:window_manager/window_manager.dart';

const String versionName = "0.00.005";
// const String versionName = "0.00.005";
String versionName = "?.?.?"; // is read from pubspec.yaml

int maxTerminalChars = 500;
int maxTerminalCharsTrimThreshold = 20;

void main() {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
PackageInfo packageInfo = await PackageInfo.fromPlatform();
versionName = packageInfo.version;

runApp(const MyApp());
}

Expand Down
61 changes: 61 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99
url: "https://pub.dev"
source: hosted
version: "2.0.2"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -123,6 +131,27 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
http:
dependency: transitive
description:
name: http
sha256: "4c3f04bfb64d3efd508d06b41b825542f08122d30bda4933fb95c069d22a4fa3"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
url: "https://pub.dev"
source: hosted
version: "4.0.2"
image:
dependency: transitive
description:
Expand Down Expand Up @@ -195,6 +224,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.4.0"
package_info_plus:
dependency: "direct main"
description:
name: package_info_plus
sha256: ceb027f6bc6a60674a233b4a90a7658af1aebdea833da0b5b53c1e9821a78c7b
url: "https://pub.dev"
source: hosted
version: "4.0.2"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
path:
dependency: transitive
description:
Expand All @@ -211,6 +256,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.4.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
pointycastle:
dependency: transitive
description:
Expand Down Expand Up @@ -304,6 +357,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
win32:
dependency: transitive
description:
name: win32
sha256: "7dacfda1edcca378031db9905ad7d7bd56b29fd1a90b0908b71a52a12c41e36b"
url: "https://pub.dev"
source: hosted
version: "5.0.3"
window_manager:
dependency: "direct main"
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dependencies:
flutter_launcher_icons: ^0.13.1
intl: ^0.18.0
multi_split_view: ^2.1.0
package_info_plus: ^4.0.2
rich_text_view: ^1.1.0
window_manager: ^0.3.4

Expand Down

0 comments on commit ef1f73f

Please sign in to comment.