cod refactoring
This commit is contained in:
parent
8c8f3d6d2a
commit
c1d6978ce9
4 changed files with 8 additions and 9 deletions
|
|
@ -35,15 +35,14 @@ class Application {
|
|||
Future<void> build(BuildType buildType, {String? yamlContent}) async {
|
||||
setUTF8();
|
||||
|
||||
DataBuild? build;
|
||||
|
||||
// var envArgs = envArguments(arguments);
|
||||
// bool isTest = envArgs.containsKey('isTest'); //for Unit Test
|
||||
try {
|
||||
var composer = _mapComposer[buildType]!;
|
||||
await composer.compose(yamlContent, printBuildStep);
|
||||
_jenkinsData = composer.jenkinsData;
|
||||
build = DataBuild.fromJson(getMapFromYaml(composer.buildYaml)!);
|
||||
DataBuild? build =
|
||||
DataBuild.fromJson(getMapFromYaml(composer.buildYaml)!);
|
||||
await CLI.println(
|
||||
'********************************* Build Data *************************************',
|
||||
color: Color.magenta);
|
||||
|
|
@ -69,7 +68,7 @@ class Application {
|
|||
if (Platform.isWindows) {
|
||||
var data = await ProcessExecutor.start(StringBuffer('chcp 65001'));
|
||||
var exitCode = await data.process.exitCode;
|
||||
print('======> Set Korean: ${exitCode == 0}');
|
||||
print('Set Korean: ${exitCode == 0}');
|
||||
}
|
||||
return simpleFuture;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class BuildDart extends Command {
|
|||
}
|
||||
|
||||
var process = await ProcessExecutor.start(await appendShell(shell, command),
|
||||
workspace: workspace, enableStderr: false);
|
||||
workspace: workspace, printStderr: false);
|
||||
|
||||
return await complete(await process.process.exitCode, command,
|
||||
errorMessage: process.stderr.toString());
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class BuildDotNet extends Command {
|
|||
shell.writeln(
|
||||
'MSBuild ${data.projectFile} /t:build /p:Configuration=Release;Platform=x86');
|
||||
var process = await ProcessExecutor.start(shell,
|
||||
workspace: workspace, enableStderr: false);
|
||||
workspace: workspace, printStderr: false);
|
||||
|
||||
return complete(await process.process.exitCode, command,
|
||||
errorMessage: process.stderr.toString());
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class BuildiOS extends Command {
|
|||
' && xcodebuild -workspace $workspacePath -scheme ${data.scheme} -destination $destination');
|
||||
|
||||
var processData = await ProcessExecutor.start(shell,
|
||||
workspace: workspace, enableStderr: false);
|
||||
workspace: workspace, printStderr: false);
|
||||
var exitCode = await processData.process.exitCode;
|
||||
var success = exitCode == 0;
|
||||
if (success) {
|
||||
|
|
@ -69,7 +69,7 @@ class ArchiveiOS extends Command {
|
|||
'xcodebuild -workspace $workspacePath -scheme ${data.scheme} -archivePath $archivePath archive');
|
||||
|
||||
var processData = await ProcessExecutor.start(shell,
|
||||
workspace: workspace, enableStderr: false);
|
||||
workspace: workspace, printStderr: false);
|
||||
|
||||
return complete(await processData.process.exitCode, command,
|
||||
errorMessage: processData.stderr.toString());
|
||||
|
|
@ -94,7 +94,7 @@ class ExportiOS extends Command {
|
|||
'xcodebuild -exportArchive -archivePath $archivePath -exportPath $exportPath -exportOptionsPlist $exportOptionPlistPath');
|
||||
|
||||
var processData = await ProcessExecutor.start(shell,
|
||||
workspace: workspace, enableStderr: false);
|
||||
workspace: workspace, printStderr: false);
|
||||
|
||||
return complete(await processData.process.exitCode, command,
|
||||
errorMessage: processData.stderr.toString());
|
||||
|
|
|
|||
Loading…
Reference in a new issue