diff --git a/frontend/scripts/flutter_release_build/build_flowy.dart b/frontend/scripts/flutter_release_build/build_flowy.dart index 5cd1989bb0087..03f3b58503144 100644 --- a/frontend/scripts/flutter_release_build/build_flowy.dart +++ b/frontend/scripts/flutter_release_build/build_flowy.dart @@ -2,6 +2,9 @@ import 'dart:io'; part 'tool.dart'; +const excludeTagBegin = 'BEGIN: EXCLUDE_IN_RELEASE'; +const excludeTagEnd = 'END: EXCLUDE_IN_RELEASE'; + Future main(List args) async { const help = ''' A build script that modifies build assets before building the release version of AppFlowy. diff --git a/frontend/scripts/flutter_release_build/tool.dart b/frontend/scripts/flutter_release_build/tool.dart index 362cf11d68837..2b91e1571d39d 100644 --- a/frontend/scripts/flutter_release_build/tool.dart +++ b/frontend/scripts/flutter_release_build/tool.dart @@ -66,9 +66,9 @@ class _BuildTool { var scanMode = _ScanMode.ignore; for (var i = 0; i < lines.length; i++) { var line = lines[i]; - if (line.contains('BEGIN: EXCLUDE_IN_RELEASE')) { + if (line.contains(excludeTagBegin)) { scanMode = _ScanMode.target; - } else if (line.contains('END: EXCLUDE_IN_RELEASE')) { + } else if (line.contains(excludeTagBegin)) { scanMode = _ScanMode.ignore; } else if (scanMode == _ScanMode.target) { lines[i] = _modify(line, mode: mode);