From 99145a43b6c4f663cb1f3d0fac57ff96af1268bd Mon Sep 17 00:00:00 2001 From: Toki Date: Mon, 30 Dec 2024 18:10:27 +0900 Subject: [PATCH] =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=EC=9A=A9=20pipeline?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/pipeline-test2.yaml | 34 +++++++++++++++++++++++++++ lib/cli/commands/command_manager.dart | 11 +++++---- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/assets/pipeline-test2.yaml b/assets/pipeline-test2.yaml index e69de29..a829320 100644 --- a/assets/pipeline-test2.yaml +++ b/assets/pipeline-test2.yaml @@ -0,0 +1,34 @@ +--- +property: + workspace: . + +pipeline: + id: main + workflow: + - exe: createApp + - exe: shell + - exe: buildDart + +commands: +### Version 쓰기 +- command: CreateAppData + id: createApp + param: + scm: Git + name: OTO + relativeAssetPath: assets/data + setVersion: <@property.version> + setHash: <@property.hash> + +- command: Shell + id: shell + param: + commands: + - source ~/.bash_profile + +### 실행가능한 파일로 빌드 +- command: BuildDartCompile + id: buildDart + param: + targetDartFile: "./bin/main.dart" + buildFileName: oto diff --git a/lib/cli/commands/command_manager.dart b/lib/cli/commands/command_manager.dart index 57af4bb..97e6f0e 100644 --- a/lib/cli/commands/command_manager.dart +++ b/lib/cli/commands/command_manager.dart @@ -35,17 +35,18 @@ class CommandManager { } if (!printHelp) { - if(parameters.isEmpty) { + if (parameters.isEmpty) { commandItem.printHelp(); } else { await CLI.println('Execute command: $command$argStr', - color: Color.green); + color: Color.green); try { - await commandItem.execute(parameters); - } on Exception catch(e, stacktace) { + await commandItem.execute(parameters); + } on Exception catch (e) { print(''); var message = e.toString().replaceAll('Exception:', ''); - await CLI.println('${CLI.style('Error:', background: Color.red)} $message'); + await CLI.println( + '${CLI.style('Error:', background: Color.red)} $message'); print(''); } }