diff --git a/assets/script/batch/build.bat b/assets/script/batch/build.bat index 1669157..39fc466 100644 --- a/assets/script/batch/build.bat +++ b/assets/script/batch/build.bat @@ -1,12 +1,17 @@ @echo off +set "PathSystem=" +for /F "skip=2 tokens=1,2*" %%G in ('%SystemRoot%\System32\reg.exe query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v "Path" 2^>nul') do if /I "%%G" == "Path" ( + if /I "%%H" == "REG_EXPAND_SZ" (set "PathExpand=1" & set "PathSystem=%%I") else if /I "%%H" == "REG_SZ" set "PathSystem=%%I" +) set "PathUser=" for /F "skip=2 tokens=1,2*" %%G in ('%SystemRoot%\System32\reg.exe query "HKCU\Environment" /v "Path" 2^>nul') do if /I "%%G" == "Path" ( if /I "%%H" == "REG_EXPAND_SZ" (set "PathExpand=1" & set "PathUser=%%I") else if /I "%%H" == "REG_SZ" set "PathUser=%%I" ) -PATH=%PathUser% -echo %PATH% -SET BuildData > build_data.conf +PATH=%PathSystem%;%PathUser% +echo %PATH% + +SET BuildData > build_data.conf SET BUILDER=%~dp0 cd "%BUILDER%..\..\.." diff --git a/assets/script/batch/check_package_update.bat b/assets/script/batch/check_package_update.bat index 92140c9..8951b6d 100644 --- a/assets/script/batch/check_package_update.bat +++ b/assets/script/batch/check_package_update.bat @@ -2,11 +2,16 @@ : PATH_WIN은 젠킨스에서 설정을 해주어야 한다 @echo off +set "PathSystem=" +for /F "skip=2 tokens=1,2*" %%G in ('%SystemRoot%\System32\reg.exe query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v "Path" 2^>nul') do if /I "%%G" == "Path" ( + if /I "%%H" == "REG_EXPAND_SZ" (set "PathExpand=1" & set "PathSystem=%%I") else if /I "%%H" == "REG_SZ" set "PathSystem=%%I" +) set "PathUser=" for /F "skip=2 tokens=1,2*" %%G in ('%SystemRoot%\System32\reg.exe query "HKCU\Environment" /v "Path" 2^>nul') do if /I "%%G" == "Path" ( if /I "%%H" == "REG_EXPAND_SZ" (set "PathExpand=1" & set "PathUser=%%I") else if /I "%%H" == "REG_SZ" set "PathUser=%%I" ) -PATH=%PathUser% + +PATH=%PathSystem%;%PathUser% echo %PATH% : cd ../dart_framework && git pull origin master : cd "../%JOB_NAME%"