Skip to content

Commit

Permalink
chore: use constants for exclude tag
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wallen committed Apr 1, 2023
1 parent 1283649 commit 9ffc364
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions frontend/scripts/flutter_release_build/build_flowy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import 'dart:io';

part 'tool.dart';

const excludeTagBegin = 'BEGIN: EXCLUDE_IN_RELEASE';
const excludeTagEnd = 'END: EXCLUDE_IN_RELEASE';

Future<void> main(List<String> args) async {
const help = '''
A build script that modifies build assets before building the release version of AppFlowy.
Expand Down
4 changes: 2 additions & 2 deletions frontend/scripts/flutter_release_build/tool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9ffc364

Please sign in to comment.