Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
89f95324 by Mathieu Velten at 2026-05-13T12:24:25+00:00
share: add date attr to AppStream release

(cherry picked from commit acfccc71bbd6a46aee7717c232c7b0ad4140bdcb)

- - - - -


3 changed files:

- Makefile.am
- configure.ac
- share/org.videolan.vlc.appdata.xml.in.in


Changes:

=====================================
Makefile.am
=====================================
@@ -213,3 +213,14 @@ include extras/package/macosx/package.mak
 include extras/package/win32/package.mak
 include extras/package/win32/msi.mak
 
+dist-hook:
+       chmod u+w "$(distdir)/configure" "$(distdir)/configure.ac"
+       mtime_ref=$(mktemp)
+#      We keep a copy to have a reference timestamp and restore it,
+#      to avoid triggering automake again
+       cp -p "$(distdir)/configure.ac" "$mtime_ref"
+       sed -i '/^VERSION_DATE=\$$(/,/^)/c\VERSION_DATE='$(VERSION_DATE) \
+               "$(distdir)/configure" "$(distdir)/configure.ac"
+       touch -r "$mtime_ref" "$(distdir)/configure.ac"
+       rm "$mtime_ref"
+


=====================================
configure.ac
=====================================
@@ -9,6 +9,23 @@ VERSION_REVISION=24
 VERSION_EXTRA=0
 VERSION_DEV=beta1
 
+VERSION_DATE=$(
+    VERSION_PATTERN='^v?([[0-9]]+\.?)+(-[[0-9]]+)?$'
+    VERSION_TAG=$(git tag --points-at HEAD --sort=-version:refname 2>/dev/null 
| grep -E "$VERSION_PATTERN" | head -n 1)
+    if test -n "$VERSION_TAG"; then
+        DATE=$(git for-each-ref --format='%(taggerdate:short)' 
"refs/tags/${VERSION_TAG}" 2>/dev/null)
+        if test -n "$TAG" && test -z "$DATE"; then
+            AC_MSG_ERROR([Building with TAG envvar set but no date found on 
the tag, please check that your git tag is annotated])
+            exit 1
+        fi
+        echo "$DATE"
+    else
+        date '+%Y-%m-%d'
+    fi
+) || exit $?
+
+AC_SUBST([VERSION_DATE])
+
 PKGDIR="vlc"
 AC_SUBST(PKGDIR)
 


=====================================
share/org.videolan.vlc.appdata.xml.in.in
=====================================
@@ -18,7 +18,7 @@
     <url type="bugtracker">https://trac.videolan.org/vlc/</url>
     <url type="donation">https://www.videolan.org/contribute.html</url>
     <releases>
-        <release version="@VERSION@" />
+        <release version="@VERSION@" date="@VERSION_DATE@" />
     </releases>
     <provides>
         <library>libvlc.so.5</library>



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/89f953241ec0c669da236a308bb4aa2e77f0a82c

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/89f953241ec0c669da236a308bb4aa2e77f0a82c
You're receiving this email because of your account on code.videolan.org.


_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to