eea924e114227ea66412b80dc483e89becb9d4ad — Louis Solofrizzo 6 months ago 70a00ce
artifacts: Add artifact helper

Signed-off-by: Louis Solofrizzo <lsolofrizzo@online.net>
1 files changed, 12 insertions(+), 0 deletions(-)

A artifacts/CMakeLists.txt
A artifacts/CMakeLists.txt => artifacts/CMakeLists.txt +12 -0
@@ 0,0 1,12 @@
+ macro(upload_artifacts PROJECT BINARY ARCH)
+     if(NOT IS_ABSOLUTE ${FILE})
+         set(FILE ${CMAKE_CURRENT_BINARY_DIR}/${FILE})
+     endif()
+ 
+     add_custom_target(artifacts-upload-${BINARY}
+         COMMAND ssh root@cdn.ne02ptzero.me mkdir -p /usr/share/artifacts/${PROJECT}/`git describe --abbrev=0`/${ARCH} &&
+             scp -oStrictHostKeyChecking=no ${BINARY} root@cdn.ne02ptzero.me:/usr/share/artifacts/${PROJECT}/`git describe --abbrev=0`/${ARCH}/${BINARY}
+         DEPENDS ${BINARY}
+     )
+ 
+ endmacro(upload_artifacts)