Code refactoring
This commit is contained in:
parent
7f3f27959f
commit
9812c21f86
1 changed files with 2 additions and 10 deletions
|
|
@ -35,7 +35,7 @@ class Application {
|
|||
Future<void> build(BuildType buildType, {String? yamlContent}) async {
|
||||
setUTF8();
|
||||
|
||||
Map<String, dynamic>? buildMap;
|
||||
DataBuild? build;
|
||||
|
||||
// var envArgs = envArguments(arguments);
|
||||
// bool isTest = envArgs.containsKey('isTest'); //for Unit Test
|
||||
|
|
@ -43,7 +43,7 @@ class Application {
|
|||
var composer = _mapComposer[buildType]!;
|
||||
composer.compose(yamlContent, printBuildStep);
|
||||
_jenkinsData = composer.jenkinsData;
|
||||
buildMap = getMapFromYaml(composer.buildYaml);
|
||||
build = DataBuild.fromJson(getMapFromYaml(composer.buildYaml)!);
|
||||
await CLI.println(
|
||||
'********************************* Build Data *************************************',
|
||||
color: Color.magenta);
|
||||
|
|
@ -55,10 +55,6 @@ class Application {
|
|||
return;
|
||||
}
|
||||
|
||||
var c = Completer();
|
||||
DataBuild? build;
|
||||
build = DataBuild.fromJson(buildMap!);
|
||||
|
||||
_property = build.common;
|
||||
for (var command in build.commands) {
|
||||
String commandStr =
|
||||
|
|
@ -69,7 +65,6 @@ class Application {
|
|||
}
|
||||
}
|
||||
|
||||
c.complete();
|
||||
await printBuildStep('Build Successfully Complete', Color.cyan);
|
||||
exit(0);
|
||||
}
|
||||
|
|
@ -113,9 +108,6 @@ class DataComposerTest extends DataComposer {
|
|||
}
|
||||
|
||||
class DataComposerFile extends DataComposer {
|
||||
DataJenkins? jenkinsData;
|
||||
String buildYaml = '';
|
||||
|
||||
@override
|
||||
Future compose(String? yaml, Future Function(String, Color?) printer) async {
|
||||
jenkinsData = DataJenkins.fromJson(FileData.jenkinsMap!);
|
||||
|
|
|
|||
Loading…
Reference in a new issue