-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move environment variable related strings into one class (#648
- Loading branch information
1 parent
30611f4
commit 2db32ec
Showing
9 changed files
with
108 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
packages/melos/lib/src/common/environment_variable_key.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
class EnvironmentVariableKey { | ||
EnvironmentVariableKey._(); | ||
|
||
static const String melosRootPath = 'MELOS_ROOT_PATH'; | ||
static const String melosPackageName = 'MELOS_PACKAGE_NAME'; | ||
static const String melosPackageVersion = 'MELOS_PACKAGE_VERSION'; | ||
static const String melosPackagePath = 'MELOS_PACKAGE_PATH'; | ||
static const String melosParentPackageName = 'MELOS_PARENT_PACKAGE_NAME'; | ||
static const String melosParentPackageVersion = | ||
'MELOS_PARENT_PACKAGE_VERSION'; | ||
static const String melosParentPackagePath = 'MELOS_PARENT_PACKAGE_PATH'; | ||
static const String melosScript = 'MELOS_SCRIPT'; | ||
static const String melosTest = 'MELOS_TEST'; | ||
|
||
/// This user-defined environment variable contains a comma delimited list of | ||
/// package names that Melos should focus on. This will act as the global | ||
/// `scope` package filter, and it will override the `scope` for all the | ||
/// filtering options defined in the `packageFilters` section. | ||
static const String melosPackages = 'MELOS_PACKAGES'; | ||
|
||
/// This user-defined environment has a path to the Dart/Flutter SDK to use. | ||
/// This environment variable has precedence over the `sdkPath` option in | ||
/// `melos.yaml`, but is overridden by the command line option `--sdk-path`. | ||
static const String melosSdkPath = 'MELOS_SDK_PATH'; | ||
|
||
static const String melosTerminalWidth = 'MELOS_TERMINAL_WIDTH'; | ||
|
||
static const String path = 'PATH'; | ||
|
||
static List<String> allMelosKeys() => [ | ||
melosRootPath, | ||
melosPackageName, | ||
melosPackageVersion, | ||
melosPackagePath, | ||
melosParentPackageName, | ||
melosParentPackageVersion, | ||
melosParentPackagePath, | ||
melosScript, | ||
melosTest, | ||
melosPackages, | ||
melosSdkPath, | ||
melosTerminalWidth, | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters