fix: same eof newline on Mac and Linux
@@ -49,7 +49,7 @@ for type in "${endpoint_types[@]}"; do
oc get --raw "/swaggerapi/${type}/${endpoint}" --config="${MASTER_CONFIG_DIR}/admin.kubeconfig" > "${generated_file}"
os::util::sed 's|https://127.0.0.1:38443|https://127.0.0.1:8443|g' "${generated_file}"
- printf '\n' >> "${generated_file}"
+ os::util::sed '$a\' "${generated_file}" # add eof newline if it is missing
done
done
@@ -59,7 +59,7 @@ oc get --raw "/swagger.json" --config="${MASTER_CONFIG_DIR}/admin.kubeconfig" >
os::util::sed 's|https://127.0.0.1:38443|https://127.0.0.1:8443|g' "${generated_file}"
os::util::sed -E 's|"version": "[^\"]+"|"version": "latest"|g' "${generated_file}"
-printf '\n' >> "${generated_file}"
+os::util::sed '$a\' "${generated_file}" # add eof newline if it is missing
# Copy all protobuf generated specs into the api/protobuf-spec directory
proto_spec_out_dir="${OS_ROOT}/${SWAGGER_SPEC_REL_DIR}/api/protobuf-spec"
