From cc2741da198e7b74c1e98bba25dadb32f90f5a0a Mon Sep 17 00:00:00 2001 From: "leedongmyung[desktop]" Date: Thu, 16 Nov 2023 19:42:09 +0900 Subject: [PATCH] test --- build_win.yaml | 6 +++--- lib/cli/cli.dart | 14 +++++++++++--- lib/oto/application.dart | 13 +++++++++---- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/build_win.yaml b/build_win.yaml index 390826c..c98316c 100644 --- a/build_win.yaml +++ b/build_win.yaml @@ -3,7 +3,7 @@ common: workspace: "." commands: -### Version ���� +### Version 쓰기 - command: CreateAppData param: scm: Git @@ -12,13 +12,13 @@ commands: returnVersion: "" returnHash: "" -### ���డ���� ���Ϸ� ���� +### 실행가능한 파일로 빌드 - command: BuildDartCompile param: targetDartFile: "./bin/main.dart" buildFileName: oto_cli -### ���� zip ���� ���·� ���� +### 최종 zip 파일 형태로 저장 - command: Zip param: zipFile: "/release/oto_win_v.zip" diff --git a/lib/cli/cli.dart b/lib/cli/cli.dart index 6cc6433..b656769 100644 --- a/lib/cli/cli.dart +++ b/lib/cli/cli.dart @@ -120,6 +120,14 @@ class CLI { return simpleFuture; } + static Future printBuffer(StringBuffer buffer) async { + return await print(buffer.toString().split('\n')); + } + + static Future printString(String str) async { + return await print(str.split('\n')); + } + late CLIConfig config; late CommandManager _commandManager; @@ -208,12 +216,12 @@ class _PrinterWindows extends Printer { message.writeln('call :setESC'); for (var item in printList) { - if (item.isEmpty) { + if (item.trim().isEmpty) { message.writeln('echo.'); } else { item = item - .replaceAll('<', '^<') - .replaceAll('>', '^>') + // .replaceAll('<', '^<') + // .replaceAll('>', '^>') // .replaceAll('[', '^[') .replaceAll(']', '^]') .replaceAll('|', '^|'); diff --git a/lib/oto/application.dart b/lib/oto/application.dart index 2201b03..0d76748 100644 --- a/lib/oto/application.dart +++ b/lib/oto/application.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:dart_framework/platform/process.dart'; import 'package:dart_framework/utils/system_util.dart'; +import 'package:oto_cli/cli/cli.dart'; import 'package:oto_cli/oto/command.dart'; import 'package:oto_cli/oto/data/data.dart'; import 'package:oto_cli/oto/data/jenkins_data.dart'; @@ -69,12 +70,18 @@ class Application { print(jsonStr); } _jenkinsData = DataJenkins.fromJson(jenkinsMap!); - buildMap = getMapFromYaml(await getBuildData()); + + var content = await getBuildData(); + CLI.printString(CLI.style(content, color: Color.green)); + buildMap = getMapFromYaml(content); break; case BuildType.file: _jenkinsData = DataJenkins.fromJson(FileData.jenkinsMap!); - buildMap = getMapFromYaml(yamlContent!); + + var content = yamlContent!; + CLI.printString(CLI.style(content, color: Color.green)); + buildMap = getMapFromYaml(content); break; } @@ -161,8 +168,6 @@ class Application { } else { content = await file.readAsString(); } - print(content); - c.complete(content); return c.future; }