Code refactoring
This commit is contained in:
parent
33a75680ee
commit
dbd33b3fff
3 changed files with 8 additions and 7 deletions
|
|
@ -6,7 +6,6 @@ pipeline:
|
|||
id: main
|
||||
workflow:
|
||||
- async: git
|
||||
- exe: git-rev
|
||||
|
||||
- exe: json-reader
|
||||
|
||||
|
|
@ -17,11 +16,13 @@ pipeline:
|
|||
# - exe: buildDart
|
||||
|
||||
- async: git-count
|
||||
|
||||
|
||||
- wait-until-string: <!state.git-count> != complete
|
||||
|
||||
- async: git-rev
|
||||
|
||||
- while:
|
||||
condition-int: <!property.git-count> == null
|
||||
condition-string: <!property.git-rev> == null
|
||||
on-do:
|
||||
- exe: git
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ class PipelineExe extends PipelineExecutor {
|
|||
|
||||
Future<DataCommand> get commandData async {
|
||||
var commandData = Application.instance.dataCommandMap[commandID]!;
|
||||
await Application.instance
|
||||
.printBuildStep('Phase Start: ${commandData.name}', Color.green);
|
||||
await Application.instance.printBuildStep(
|
||||
'Phase Start: ${commandData.name} ($commandID)', Color.green);
|
||||
return dataFutrue(commandData);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ class PipelineWaitUntil extends PiplineCondition {
|
|||
Future execute() async {
|
||||
var condition = data.condition!;
|
||||
var result = checkCondition(condition);
|
||||
await printCondition('Wait-Unint', condition, 'Start wait.', result);
|
||||
await printCondition('Wait-Until', condition, 'Start wait.', result);
|
||||
while (result.result) {
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
result = checkCondition(data.condition!);
|
||||
}
|
||||
await printCondition('Wait-Unint', condition, 'Loop escape.', result);
|
||||
await printCondition('Wait-Until', condition, 'Loop escape.', result);
|
||||
return simpleFuture;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue