Commit 6f0bb206 authored by Devon Carew's avatar Devon Carew

rename deploy to release (#3407)

parent 261923e5
57043227981727ae8ceb1d51514a2e0d14bf53f9
284929b60543c282419208bce4b26772e9cf0ff1
......@@ -15,12 +15,12 @@ enum BuildType {
debug,
}
/// The type of build - `debug` or `deploy`.
/// The type of build - `debug` or `release`.
///
/// TODO(devoncarew): Add a `profile` mode.
enum BuildMode {
debug,
deploy
release
}
String getModeName(BuildMode mode) => getEnumName(mode);
......
......@@ -189,7 +189,7 @@ class FlutterEngine {
List<String> _getEngineDirs() {
List<String> dirs = <String>[
'android-arm',
'android-arm-deploy',
'android-arm-release',
'android-x64'
];
......
......@@ -170,8 +170,8 @@ class BuildApkCommand extends FlutterCommand {
@override
final String description = 'Build an Android APK file from your app.\n\n'
'This command can build development and deployable versions of your application. \'debug\' builds\n'
'support debugging and a quick development cycle. \'deploy\' builds don\'t support debugging and are\n'
'This command can build debug and release versions of your application. \'debug\' builds support\n'
'debugging and a quick development cycle. \'release\' builds don\'t support debugging and are\n'
'suitable for deploying to app stores.';
@override
......
......@@ -64,18 +64,18 @@ abstract class FlutterCommand extends Command {
argParser.addFlag('debug',
negatable: false,
help: 'Build a debug version of your app (the default).');
argParser.addFlag('deploy',
argParser.addFlag('release',
negatable: false,
help: 'Build a deployable version of your app.');
help: 'Build a release version of your app.');
}
BuildMode getBuildMode() {
if (argResults['debug'] && argResults['deploy'])
throw new UsageException('Only one of --debug or --deploy should be specified.', null);
if (argResults['debug'] && argResults['release'])
throw new UsageException('Only one of --debug or --release should be specified.', null);
BuildMode mode = BuildMode.debug;
if (argResults['deploy'])
mode = BuildMode.deploy;
if (argResults['release'])
mode = BuildMode.release;
return mode;
}
......
......@@ -162,9 +162,9 @@ class ToolConfiguration {
return new Directory(path.join(engineSrcPath, 'out/${type}_$_modeStr'));
} else {
// For now, only suffix for deploy variants.
String suffix = mode == BuildMode.deploy ? '-${getModeName(mode)}' : '';
String suffix = mode == BuildMode.release ? '-${getModeName(mode)}' : '';
// Create something like `android-arm` or `android-arm-deploy`.
// Create something like `android-arm` or `android-arm-release`.
String dirName = getNameForTargetPlatform(platform) + suffix;
Directory engineDir = _cache.getArtifactDirectory('engine');
return new Directory(path.join(engineDir.path, dirName));
......
......@@ -37,8 +37,8 @@ void main() {
endsWith('cache/artifacts/engine/android-arm')
);
expect(
toolConfig.getEngineArtifactsDirectory(TargetPlatform.android_arm, BuildMode.deploy).path,
endsWith('cache/artifacts/engine/android-arm-deploy')
toolConfig.getEngineArtifactsDirectory(TargetPlatform.android_arm, BuildMode.release).path,
endsWith('cache/artifacts/engine/android-arm-release')
);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment