6 # NOTE: pkg_* variables can be defined here
8 # pkg_src, pkg_src_bin, pkg_src_cmd
9 # pkg_dst, pkg_dst_bin, pkg_dst_cmd
11 # Their defaults are defined in _webi/template.sh at https://github.com/webinstall/packages
13 pkg_cmd_name="flutter"
15 pkg_get_current_version() {
16 # 'flutter --version' outputs a lot of information:
17 # Flutter 1.19.0-4.1.pre • channel beta • https://github.com/flutter/flutter.git
18 # Framework • revision f994b76974 (4 days ago) • 2020-06-09 15:53:13 -0700
19 # Engine • revision 9a28c3bcf4
20 # Tools • Dart 2.9.0 (build 2.9.0-14.1.beta)
21 # This trims it down to just the version number:
23 echo "$(flutter --version 2>/dev/null | head -n 1 | cut -d' ' -f2)"
26 pkg_format_cmd_version() {
27 # 'flutter 1.19.0' is the canonical version format for flutter
29 echo "$pkg_cmd_name $my_version"