From d5ea821e0e8d78b45c2cd66fc34500d4383d80bd Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 2 Oct 2021 13:01:47 +0200 Subject: metainfo.xml: Add missing release timestamp attribute Before, we only added the `date` attribute. The `timestamp` doesn't carry any additional information, but it's required for flatpak: https://mixxx.zulipchat.com/#narrow/stream/109171-development/topic/Flatpak.20build/near/255671054 --- res/linux/org.mixxx.Mixxx.metainfo.xml | 34 +++++++++++++++++----------------- tools/update_metainfo.py | 9 ++++++--- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/res/linux/org.mixxx.Mixxx.metainfo.xml b/res/linux/org.mixxx.Mixxx.metainfo.xml index 312e871099..b133c72db2 100644 --- a/res/linux/org.mixxx.Mixxx.metainfo.xml +++ b/res/linux/org.mixxx.Mixxx.metainfo.xml @@ -98,7 +98,7 @@ Do not edit it manually. --> - +
  • @@ -306,7 +306,7 @@
- +

Hotcues @@ -863,7 +863,7 @@ - +

  • @@ -954,7 +954,7 @@
- +
  • @@ -1038,7 +1038,7 @@
- +
  • @@ -1113,7 +1113,7 @@
- +
  • @@ -1147,7 +1147,7 @@
- +

General @@ -1226,7 +1226,7 @@ - +

  • @@ -1252,7 +1252,7 @@
- +
  • @@ -1278,7 +1278,7 @@
- +
  • @@ -1356,7 +1356,7 @@
- +
  • @@ -1398,7 +1398,7 @@
- +

Fix track selection not getting shown in the track @@ -1410,7 +1410,7 @@ each build.

- +

Fix a severe performance regression on Windows: @@ -1418,7 +1418,7 @@ each build.

- +

Yet another bugfix release of Mixxx 2.1. @@ -1473,7 +1473,7 @@ Here is a quick summary of what is new in Mixxx 2.1.2: - +

After two months it is time to do a bugfix release of Mixxx 2.1. @@ -1544,7 +1544,7 @@ Here is a quick summary of what is new in Mixxx 2.1.1: - +

After two years of hard work, we are pleased to announce Mixxx 2.1. We @@ -1796,7 +1796,7 @@ tips on getting started contributing code to Mixxx.

- +
  • diff --git a/tools/update_metainfo.py b/tools/update_metainfo.py index 694c6244c1..bf01ed82f7 100755 --- a/tools/update_metainfo.py +++ b/tools/update_metainfo.py @@ -23,12 +23,15 @@ def parse_changelog(content): "version": matchobj.group("number"), } try: - attrib["date"] = datetime.datetime.strptime( + release_date = datetime.datetime.strptime( matchobj.group("date"), " (%Y-%m-%d)" - ).strftime("%Y-%m-%d") - attrib["type"] = "stable" + ).replace(tzinfo=datetime.timezone.utc) except ValueError: attrib["type"] = "development" + else: + attrib["type"] = "stable" + attrib["date"] = release_date.strftime("%Y-%m-%d") + attrib["timestamp"] = "{:.0f}".format(release_date.timestamp()) soup = bs4.BeautifulSoup( markdown.markdown(description_md), "html.parser" -- cgit v1.2.3