Commit 1b75b63f by amir

dd packaging and publish to archiva

parent 7a23ebc9
Showing with 50 additions and 1 deletions
......@@ -69,7 +69,8 @@ target_link_libraries (test_ZMQ Microservice)
# install include files
#
set (CMAKE_INSTALL_PREFIX ../internals)
#set (CMAKE_INSTALL_PREFIX ../internals)
set (CMAKE_INSTALL_PREFIX dist)
# src
file (GLOB INSTALL_FILES "src/*.h")
install(FILES ${INSTALL_FILES} DESTINATION include/microservice)
......@@ -92,7 +93,27 @@ install(FILES ${INSTALL_FILES} DESTINATION include/microservice/impl/servers)
file (GLOB INSTALL_FILES "src/handlers/*.h")
install(FILES ${INSTALL_FILES} DESTINATION include/microservice/handlers)
#CPack
include (InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_VERSION_MAJOR ${Microservice_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${Microservice_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${Microservice_VERSION_PATCH})
set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CMAKE_PROJECT_NAME}-${Microservice_VERSION_STRING}")
set(CPACK_SOURCE_GENERATOR "ZIP")
set(CPACK_PACKAGE_INSTALL_DIRECTORY dist)
set(CPACK_SET_DESTDIR "ON")
set(CPACK_PACKAGE_DEFAULT_LOCATION "./dist")
#set(CPACK_SOURCE_IGNORE_FILES
# "/build/;/.bzr/;~$;${CPACK_SOURCE_IGNORE_FILES}")
include(CPack)
#add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
# install lib files
#
install(TARGETS Microservice DESTINATION lib)
set(PUBLISH_FILE ${CPACK_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}.tar.gz)
add_custom_target(publish COMMAND gradle uploadArchives -Pcversion=${Microservice_VERSION_STRING} -Ppublish_file=${PUBLISH_FILE})
\ No newline at end of file
//apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
group = 'common.cpp'
version = cversion
def someFile = file(publish_file) //'Microservice-0.4.0-Linux.tar.gz')
artifacts {
archives(someFile){
name 'microservice'
}
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'http://172.16.1.132:8081/repository/internal') {
authentication(userName: 'admin', password: 'giptmgr1')
}
// snapshotRepository(url: 'http://172.16.1.132:8081/repository/internal') {
// authentication(userName: 'admin', password: 'giptmgr1')
// }
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment