This commit is contained in:
Toki 2024-12-30 21:37:31 +09:00
parent 3a9bff76f1
commit a970f72f40

View file

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:dart_framework/utils/string_util.dart';
import 'package:dart_framework/utils/system_util.dart';
import 'package:oto_cli/cli/cli.dart';
import 'package:oto_cli/oto/application.dart';
@ -51,8 +52,12 @@ class DataComposerJenkins extends DataComposer {
]).then((ProcessResult result) => jsonStr = result.stdout);
jenkinsMap = getMapFromJson(jsonStr)!;
var shell = 'echo -e \$BuildData';
await Process.run(shell, []).then((processResult) {
var shell = StringBuffer('echo -e \$BuildData');
var fileTemp = File('${Directory.systemTemp}/temp_${getDates()}.sh');
fileTemp.createSync();
fileTemp.writeAsStringSync(shell.toString(), flush: true);
await Process.run(shellExe, [fileTemp.path]).then((processResult) {
fileTemp.deleteSync();
var file =
File('/home/toki/jenkins/workspace/oto_cli_linux/build_data.yaml');
file.createSync();