Quellcode durchsuchen

UI: Set flathub::manifest

Currently, the manifest URL on Flathub Beta website points to the
deprecated manifest hosted on Flathub. The flathub::manifest key
is undocumented attribute that will update the website to use the
proper location.

This key will not affect appstream other than providing enough
information to the Flathub website.
Bartłomiej Piotrowski vor 3 Jahren
Ursprung
Commit
853ae5ea6e
2 geänderte Dateien mit 15 neuen und 0 gelöschten Zeilen
  1. 12 0
      UI/xdg-data/CMakeLists.txt
  2. 3 0
      UI/xdg-data/com.obsproject.Studio.appdata.xml.in

+ 12 - 0
UI/xdg-data/CMakeLists.txt

@@ -11,6 +11,18 @@ if(NOT DEFINED APPDATA_RELEASE_DATE)
   endif()
   endif()
 endif()
 endif()
 
 
+if(NOT DEFINED GIT_HASH)
+  if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
+    execute_process(
+      COMMAND git rev-parse HEAD
+      OUTPUT_VARIABLE GIT_HASH
+      WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+  else()
+    set(GIT_HASH "master")
+  endif()
+endif()
+
 configure_file(com.obsproject.Studio.appdata.xml.in
 configure_file(com.obsproject.Studio.appdata.xml.in
                com.obsproject.Studio.appdata.xml)
                com.obsproject.Studio.appdata.xml)
 
 

+ 3 - 0
UI/xdg-data/com.obsproject.Studio.appdata.xml.in

@@ -43,4 +43,7 @@
   <releases>
   <releases>
     <release version="@OBS_VERSION@" date="@APPDATA_RELEASE_DATE@"/>
     <release version="@OBS_VERSION@" date="@APPDATA_RELEASE_DATE@"/>
   </releases>
   </releases>
+  <custom>
+    <value key="flathub::manifest">https://github.com/obsproject/obs-studio/blob/@GIT_HASH@/CI/flatpak/com.obsproject.Studio.json</value>
+  </custom>
 </component>
 </component>