test
This commit is contained in:
parent
cb52d52c74
commit
bca1209045
3 changed files with 23 additions and 23 deletions
|
|
@ -3,7 +3,7 @@ common:
|
|||
workspace: "."
|
||||
|
||||
commands:
|
||||
### Version 쓰기
|
||||
### Version 쓰기
|
||||
- command: CreateAppData
|
||||
param:
|
||||
scm: Git
|
||||
|
|
@ -12,13 +12,13 @@ commands:
|
|||
returnVersion: "<!common.version>"
|
||||
returnHash: "<!common.hash>"
|
||||
|
||||
### 실행가능한 파일로 빌드
|
||||
### 실행가능한 파일로 빌드
|
||||
- command: BuildDartCompile
|
||||
param:
|
||||
targetDartFile: "./bin/main.dart"
|
||||
buildFileName: oto_cli
|
||||
|
||||
### 최종 zip 파일 형태로 저장
|
||||
### 최종 zip 파일 형태로 저장
|
||||
- command: Zip
|
||||
param:
|
||||
zipFile: "<!common.workspace>/release/oto_win_v<!common.version>.zip"
|
||||
|
|
|
|||
|
|
@ -211,21 +211,25 @@ class _PrinterWindows extends Printer {
|
|||
var c = Completer();
|
||||
StringBuffer message = StringBuffer();
|
||||
message.writeln('@echo off');
|
||||
message.writeln('');
|
||||
message.writeln('setlocal');
|
||||
message.writeln('call :setESC');
|
||||
|
||||
for (var item in printList) {
|
||||
if (item.trim().isEmpty) {
|
||||
message.writeln('echo.');
|
||||
} else {
|
||||
item = item
|
||||
.replaceAll('<', '^<')
|
||||
.replaceAll('>', '^>')
|
||||
// .replaceAll('[', '^[')
|
||||
.replaceAll(']', '^]')
|
||||
.replaceAll('|', '^|');
|
||||
message.writeln('echo $item');
|
||||
if (printList.length == 1) {
|
||||
message.writeln('echo | set /p=${printList.first}');
|
||||
} else {
|
||||
for (var item in printList) {
|
||||
if (item.trim().isEmpty) {
|
||||
message.writeln('echo.');
|
||||
} else {
|
||||
item = item
|
||||
// .replaceAll('<', '^<')
|
||||
// .replaceAll('>', '^>')
|
||||
// .replaceAll('[', '^[')
|
||||
.replaceAll(']', '^]')
|
||||
.replaceAll('|', '^|')
|
||||
.replaceAll('\n', '');
|
||||
message.writeln('echo $item');
|
||||
}
|
||||
}
|
||||
}
|
||||
message.writeln(':setESC');
|
||||
|
|
@ -234,7 +238,7 @@ class _PrinterWindows extends Printer {
|
|||
message.writeln(' set ESC=%%b');
|
||||
message.writeln(' exit /B 0');
|
||||
message.writeln(')');
|
||||
message.writeln('exit /B 0');
|
||||
// message.writeln('exit /B 0');
|
||||
|
||||
var temp = await getTempFile(message.toString(), 'bat');
|
||||
await Process.run('cmd', ['/C', temp.path]).then((ProcessResult result) {
|
||||
|
|
|
|||
|
|
@ -72,8 +72,7 @@ class Application {
|
|||
_jenkinsData = DataJenkins.fromJson(jenkinsMap!);
|
||||
|
||||
var content = await getBuildData();
|
||||
// await composeANSIPrint(content, Color.green);
|
||||
await CLI.printString(CLI.style(content, color: Color.green));
|
||||
await composeANSIPrint(content, Color.green);
|
||||
buildMap = getMapFromYaml(content);
|
||||
break;
|
||||
|
||||
|
|
@ -82,6 +81,7 @@ class Application {
|
|||
|
||||
var content = yamlContent!;
|
||||
await CLI.printString(CLI.style(content, color: Color.green));
|
||||
// await composeANSIPrint(content, Color.green);
|
||||
buildMap = getMapFromYaml(content);
|
||||
break;
|
||||
}
|
||||
|
|
@ -92,13 +92,9 @@ class Application {
|
|||
|
||||
Future composeANSIPrint(String value, Color color) async {
|
||||
var list = value.split('\n');
|
||||
List<String> listNew = [];
|
||||
for (var item in list) {
|
||||
var msg = CLI.style(item, color: color);
|
||||
listNew.add(item);
|
||||
print(msg);
|
||||
await CLI.print([CLI.style(item, color: color)]);
|
||||
}
|
||||
await CLI.print(listNew);
|
||||
return simpleFuture;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue