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