Explorar o código

WebClient: new way to grab the latest version

Tobias Hieta %!s(int64=7) %!d(string=hai) anos
pai
achega
5b397b63b1
Modificáronse 1 ficheiros con 16 adicións e 8 borrados
  1. 16 8
      CMakeModules/WebClient.cmake

+ 16 - 8
CMakeModules/WebClient.cmake

@@ -3,31 +3,39 @@ include(FetchDependencies)
 option(WEB_CLIENT_TV_OLD "" OFF)
 option(WEB_CLIENT_DISABLE_DESKTOP "" OFF)
 
-set(WEB_CLIENT_BUILD_NUMBER 20)
-set(DESKTOP_VERSION 3.34.1-b51c37a)
-set(TVOLD_VERSION 3.13.3-5401c32)
-set(TV_VERSION 3.33.4-81b752aa)
+# This is the line to edit when you bump the web-client.
+set(WEB_CLIENT_BUILD_ID 37-0382f7813d1fc7)
+
+get_content_of_url(
+  URL "https://artifacts.plex.tv/web-client-pmp/${WEB_CLIENT_BUILD_ID}/buildid.cmake"
+  CONTENT_VAR BUILDIDS
+  FILENAME "buildid-${WEB_CLIENT_BUILD_ID}.cmake"
+)
 
 if(WEB_CLIENT_TV_OLD)
   set(TV_VERSION ${TVOLD_VERSION})
 endif()
 
+message(STATUS ${BUILDIDS})
+
+include("${DEPENDENCY_CACHE_DIR}/buildid-${WEB_CLIENT_BUILD_ID}.cmake")
+
 if(NOT WEB_CLIENT_DISABLE_DESKTOP)
   download_deps("web-client-desktop"
-                BUILD_NUMBER ${WEB_CLIENT_BUILD_NUMBER}
+                BUILD_NUMBER ${WEB_CLIENT_BUILD_ID}
                 VARIANT ${DESKTOP_VERSION}
                 NO_HASH_FILE
                 ARCHSTR "universal"
-                BASE_URL "https://artifacts.plex.tv/web-client-pmp/${WEB_CLIENT_BUILD_NUMBER}"
+                BASE_URL "https://artifacts.plex.tv/web-client-pmp/${WEB_CLIENT_BUILD_ID}"
                 DIRECTORY WEB_DESKTOP_DIR
   )
 endif()
 
 download_deps("web-client-tv"
-              BUILD_NUMBER ${WEB_CLIENT_BUILD_NUMBER}
+              BUILD_NUMBER ${WEB_CLIENT_BUILD_ID}
               VARIANT ${TV_VERSION}
               NO_HASH_FILE
               ARCHSTR "universal"
-              BASE_URL "https://artifacts.plex.tv/web-client-pmp/${WEB_CLIENT_BUILD_NUMBER}"
+              BASE_URL "https://artifacts.plex.tv/web-client-pmp/${WEB_CLIENT_BUILD_ID}"
               DIRECTORY WEB_TV_DIR
 )