@@ -65,7 +65,7 @@ normalize_env_file() {
|
||||
|
||||
# 兼容由 Windows 编辑器或 Jenkins 参数落盘产生的 BOM/CRLF,避免 start.sh 加载时报命令不存在。
|
||||
LC_ALL=C sed $'1s/^\xef\xbb\xbf//;s/\r$//' "${env_file}" >"${temp_file}"
|
||||
mv "${temp_file}" "${env_file}"
|
||||
cp "${temp_file}" "${env_file}"
|
||||
}
|
||||
|
||||
normalize_release_env_files() {
|
||||
@@ -99,7 +99,7 @@ write_env_override() {
|
||||
fi
|
||||
|
||||
printf "%s=%s\n" "${key}" "${value}" >>"${temp_file}"
|
||||
mv "${temp_file}" "${env_file}"
|
||||
cp "${temp_file}" "${env_file}"
|
||||
}
|
||||
|
||||
SOURCE_DIR=""
|
||||
@@ -223,7 +223,7 @@ echo "[jenkins-deploy] 移动发布内容: ${SOURCE_DIR} -> ${DEPLOY_DIR}"
|
||||
for item in "${DEPLOY_ITEMS[@]}"; do
|
||||
if [[ -e "${SOURCE_DIR}/${item}" ]]; then
|
||||
echo "[jenkins-deploy] 覆盖产物: ${item}"
|
||||
mv "${SOURCE_DIR}/${item}" "${DEPLOY_DIR}/"
|
||||
cp "${SOURCE_DIR}/${item}" "${DEPLOY_DIR}/"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user