Update path codes
This commit is contained in:
parent
8ba2633286
commit
bd852414f4
4 changed files with 12 additions and 12 deletions
|
|
@ -11,7 +11,7 @@ pipeline:
|
|||
- async: appData
|
||||
|
||||
#비동기식 실행, 해당 수행이 완료됨과 관계없이 실행하고 다음 스텝을 실행한다
|
||||
- exe: buildDart
|
||||
# - exe: buildDart
|
||||
|
||||
#일반적인 if문과 동일
|
||||
- if:
|
||||
|
|
@ -25,7 +25,7 @@ commands:
|
|||
- command: Git
|
||||
id: git
|
||||
param:
|
||||
workspace: "<!property.workspace>/../dart_framework"
|
||||
workspace: ./../dart_framework
|
||||
commands:
|
||||
- restore .
|
||||
- clean -f
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class BuildDart extends Command {
|
|||
var data = DataBuildDart.fromJson(command.param);
|
||||
var workspace = getWorkspace(data.workspace);
|
||||
|
||||
var shell = StringBuffer('cd $workspace');
|
||||
var shell = StringBuffer(getCDPath(workspace));
|
||||
shell.write(' && flutter clean');
|
||||
shell.write(' && flutter pub upgrade --major-versions');
|
||||
shell.write(' && flutter packages upgrade');
|
||||
|
|
|
|||
|
|
@ -142,6 +142,14 @@ abstract class Command {
|
|||
return path;
|
||||
}
|
||||
|
||||
String getCDPath(String path) {
|
||||
String drive = '';
|
||||
if (Platform.isWindows) {
|
||||
drive = '${path[0]}: && ';
|
||||
}
|
||||
return '${drive}cd $path';
|
||||
}
|
||||
|
||||
String getPathNormal(String path) {
|
||||
return replaceTag(Path.getNormal(path));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:oto_cli/oto/commands/command.dart';
|
||||
import 'package:oto_cli/oto/data/command_data.dart';
|
||||
import 'package:dart_framework/platform/process.dart';
|
||||
|
|
@ -10,13 +8,7 @@ class Git extends Command {
|
|||
var data = DataGit.fromJson(command.param);
|
||||
var workspace = getWorkspace(data.workspace);
|
||||
|
||||
String drive = '';
|
||||
if (Platform.isWindows) {
|
||||
drive = '${workspace[0]}: && ';
|
||||
}
|
||||
|
||||
var shell = StringBuffer(drive);
|
||||
shell.write('cd $workspace');
|
||||
var shell = StringBuffer(getCDPath(workspace));
|
||||
var commands = data.commands;
|
||||
for (var item in commands) {
|
||||
shell.write(' && git ${getPathNormal(item)}');
|
||||
|
|
|
|||
Loading…
Reference in a new issue