Fix for pre-configure Cloud Data with the API/DAV URLs and a custom app name
@@ -127,19 +127,19 @@ function sign_and_publish_pipe_win_distribution() {
}
function configure_and_publish_cloud_data_win_distribution() {
- local jar_path="$1"
- local output_dir="$6"
- output_dir="static"
- jar_path="/opt/api/pipeline.jar"
- unzip -p "$jar_path" BOOT-INF/classes/static/cloud-data-win64.zip >cloud-data-win64.zip
- unzip -qq cloud-data-win64.zip
- rm -f cloud-data-win64.zip
-
- local _cloud_data_folder_name="cloud-data"
+ local _jar_path="$1"
+ local _output_dir="$2"
+ local _cloud_data_name="cloud-data"
if [ "$CP_CLOUD_DATA_APP_NAME" ]; then
local _cloud_data_name_json=", \"name\": \"${CP_CLOUD_DATA_APP_NAME}\""
- _cloud_data_folder_name="$CP_CLOUD_DATA_APP_NAME"
+ _cloud_data_name="$CP_CLOUD_DATA_APP_NAME"
fi
+
+ unzip -p "$_jar_path" BOOT-INF/classes/static/cloud-data-win64.zip > cloud-data-win64.zip
+ unzip -qq cloud-data-win64.zip
+ rm -f cloud-data-win64.zip
+
+
cat > cloud-data-win32-x64/settings.json <<EOF
{
"certificates": [],
@@ -149,10 +149,10 @@ cat > cloud-data-win32-x64/settings.json <<EOF
"username": "<USER_ID>" $_cloud_data_name_json
}
EOF
- mv cloud-data-win32-x64/cloud-data.exe cloud-data-win32-x64/${CP_CLOUD_DATA_APP_NAME}.exe
- mv cloud-data-win32-x64 ${_cloud_data_folder_name}-win32-x64
- zip -q -r "$output_dir/${_cloud_data_folder_name}-win64.zip" ${_cloud_data_folder_name}-win32-x64
- rm -rf ${_cloud_data_folder_name}-win32-x64
+ mv cloud-data-win32-x64/cloud-data.exe cloud-data-win32-x64/${_cloud_data_name}.exe
+ mv cloud-data-win32-x64 ${_cloud_data_name}-win32-x64
+ zip -q -r "$_output_dir/${_cloud_data_name}-win64.zip" ${_cloud_data_name}-win32-x64
+ rm -rf ${_cloud_data_name}-win32-x64
}
# Validate SSO and SSL certificates
