ci: try msys2 command on windows
authorMichael Wallner <mike@php.net>
Thu, 17 Dec 2020 11:03:05 +0000 (12:03 +0100)
committerMichael Wallner <mike@php.net>
Thu, 17 Dec 2020 11:03:05 +0000 (12:03 +0100)
CPack.txt

index 92ea450381c2646d49ae231dab1b1eff220479cf..09fb62078b9c980c9fa3992153cfd9553d4102cf 100644 (file)
--- a/CPack.txt
+++ b/CPack.txt
@@ -94,9 +94,15 @@ endif()
 # keep last
 include(CPack)
 
+set(PUSH_ARTIFACTS_SH "${CMAKE_SOURCE_DIR}/scripts/push-artifacts.sh")
+if(WIN32)
+    set(PUSH_ARTIFACTS_CMD msys2 -c '${PUSH_ARTIFACTS_SH} ${CPACK_PACKAGE_DIRECTORY}/')
+else()
+    set(PUSH_ARTIFACTS_CMD ${PUSH_ARTIFACTS_SH} ${CPACK_PACKAGE_DIRECTORY}/)
+endif()
+
 add_custom_target(push-artifacts
-        COMMAND
-            bash ${CMAKE_SOURCE_DIR}/scripts/push-artifacts.sh "${CPACK_PACKAGE_DIRECTORY}/"
+        COMMAND ${PUSH_ARTIFACTS_CMD}
         WORKING_DIRECTORY ${CPACK_BINARY_DIR}
         )