⬆️ Updated tools

This commit is contained in:
2023-05-02 10:38:42 +02:00
parent 422afa3beb
commit 15a6ca55f1
5 changed files with 6 additions and 11 deletions

View File

@@ -4,13 +4,8 @@ endmacro()
mgs("TOOL \"${TOOL}\" OWNER \"${OWNER}\"")
SET(URL "https://api.github.com/repos/${OWNER}/${TOOL}/releases/latest")
execute_process(COMMAND curl -s -L ${URL} OUTPUT_VARIABLE VERSION_JSON)
string(JSON VERSION_DIRTY GET ${VERSION_JSON} tag_name)
string(REGEX REPLACE [^0-9\\.] "" VERSION "${VERSION_DIRTY}")
string(REPLACE "." "_" VERSION_UNDERSCORE ${VERSION})
execute_process(COMMAND lastversion "${OWNER}/${TOOL}" OUTPUT_VARIABLE VERSION)
string(REPLACE "\n" "" VERSION "${VERSION}")
mgs("Latest VERSION ${VERSION}")
configure_file("${CMAKE_CURRENT_LIST_DIR}/templates/install-${TOOL}.sh.in" "${CMAKE_CURRENT_LIST_DIR}/install-${TOOL}.sh" @ONLY)