This commit is contained in:
Toki 2024-12-30 20:24:31 +09:00
parent 67760fca55
commit 539f2c9c86
2 changed files with 5 additions and 5 deletions

View file

@ -14,6 +14,4 @@ echo -e '
"gitBranch":"'${GIT_BRANCH}'",
"buildTag":"'${BUILD_TAG}'"
}'
echo -e ${BuildData}
echo -e ${BuildData} > "${WORKSPACE}/build_data.conf"

View file

@ -50,6 +50,10 @@ class DataComposerJenkins extends DataComposer {
'${Directory.current.path}/assets/script/shell/jenkins_env_params.sh'
]).then((ProcessResult result) => jsonStr = result.stdout);
jenkinsMap = getMapFromJson(jsonStr)!;
var shell = 'echo -e \$BuildData';
var result = await Process.run(shell, []);
print('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n${result.stdout}');
} else if (Platform.isWindows) {
await Process.run('cmd', [
'/C',
@ -79,9 +83,7 @@ class DataComposerJenkins extends DataComposer {
var file = File('${commonData!.workspace}/build_data.conf');
var content = '';
if (Platform.isWindows) {
content = file
.readAsStringSync(encoding: utf8)
.replaceAll('\\', '/');
content = file.readAsStringSync(encoding: utf8).replaceAll('\\', '/');
var index = content.indexOf('=');
content = content.substring(index + 1);
var regEx = RegExp(r'(%)([a-zA-Z0-9]+)(%)');