Commit b60677b4 authored by Jin Hai's avatar Jin Hai Committed by GitHub
Browse files

Merge pull request #137 from youny626/0.5.1

Add Ubuntu version specific cache

Former-commit-id: c5d1150ac392f7d344f1520b2a01a01cbd0e0335
parents a048b6a5 c99f4070
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ Please mark all change in change log and use the ticket from JIRA.
# Milvus 0.5.1 (TODO)

## Bug
- \#134 - JFrog cache error

## Feature
- \#90 - The server start error messages could be improved to enhance user experience
+193 −182
Original line number Diff line number Diff line
@@ -108,6 +108,13 @@ if (UNIX)
                if (UBUNTU_FOUND)
                    set(CMAKE_OS_NAME "ubuntu" CACHE STRING "Operating system name" FORCE)
                    set(DEBIAN_FOUND FALSE)

                    find_program(LSB_RELEASE_EXEC lsb_release)
                    execute_process(COMMAND ${LSB_RELEASE_EXEC} -rs
                            OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
                            OUTPUT_STRIP_TRAILING_WHITESPACE
                            )
                    STRING(REGEX REPLACE "\\." "_" UBUNTU_VERSION ${LSB_RELEASE_ID_SHORT})
                endif (UBUNTU_FOUND)
            endif (UBUNTU_EXTRA)
        endif (DEBIAN_FOUND)
@@ -130,7 +137,11 @@ if(USE_JFROG_CACHE STREQUAL "ON")
    if (NOT DEFINED JFROG_ARTFACTORY_URL)
        message(FATAL_ERROR "JFROG_ARTFACTORY_URL is not set")
    endif ()
    if (UBUNTU_FOUND)
        set(JFROG_ARTFACTORY_CACHE_URL "${JFROG_ARTFACTORY_URL}/milvus/thirdparty/cache/${CMAKE_OS_NAME}/${UBUNTU_VERSION}/${MILVUS_BUILD_ARCH}/${BUILD_TYPE}")
    else ()
        set(JFROG_ARTFACTORY_CACHE_URL "${JFROG_ARTFACTORY_URL}/milvus/thirdparty/cache/${CMAKE_OS_NAME}/${MILVUS_BUILD_ARCH}/${BUILD_TYPE}")
    endif ()
    if (DEFINED ENV{JFROG_USER_NAME})
        set(JFROG_USER_NAME "$ENV{JFROG_USER_NAME}")
    endif ()