Skip to content

Commit

Permalink
fix(aft): Publish updates for Dart 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Dillon Nys committed May 10, 2023
1 parent 5fd32e4 commit f834dfc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/aft/lib/src/commands/publish_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ class PublishCommand extends AmplifyCommand with GlobOptions {
static final _validationPreReleaseRegex = RegExp(
r'\* Packages dependent on a pre-release of another package should themselves be published as a pre-release version\.',
);
static final _validationPreReleaseSdkRegex = RegExp(
r'\* Packages with an SDK constraint on a pre-release of the Dart SDK should themselves be published as a pre-release version\.',
);
static final _validationNonDevOverridesRegex = RegExp(
r'\* Non-dev dependencies are overridden in pubspec_overrides\.yaml\.',
);
static final _validationErrorRegex = RegExp(r'^\s*\*');

/// Publishes the package using `pub`.
Expand Down Expand Up @@ -161,7 +167,9 @@ class PublishCommand extends AmplifyCommand with GlobOptions {
.where(_validationErrorRegex.hasMatch)
.where((line) => !_validationConstraintRegex.hasMatch(line))
.where((line) => !_validationPreReleaseRegex.hasMatch(line))
.where((line) => !_validationCheckedInFilesRegex.hasMatch(line));
.where((line) => !_validationCheckedInFilesRegex.hasMatch(line))
.where((line) => !_validationNonDevOverridesRegex.hasMatch(line))
.where((line) => !_validationPreReleaseSdkRegex.hasMatch(line));
if (failures.isNotEmpty) {
logger
..error(
Expand Down Expand Up @@ -268,7 +276,6 @@ Future<void> runBuildRunner(
'run',
'build_runner',
'build',
if (verbose) '--verbose',
'--delete-conflicting-outputs',
],
workingDirectory: package.path,
Expand Down

0 comments on commit f834dfc

Please sign in to comment.