You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/01/12 16:53:38 UTC

[buildstream] branch master updated: doc/badges.py: Adjustment of badge generation

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/buildstream.git


The following commit(s) were added to refs/heads/master by this push:
     new f1f4560  doc/badges.py: Adjustment of badge generation
f1f4560 is described below

commit f1f456046a524cef2df2e947c75804180793d549
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Wed Jan 13 01:49:57 2021 +0900

    doc/badges.py: Adjustment of badge generation
    
    Generate badges to link to the release URL on github instead of
    the tarball published on download.gnome.org, since we are no longer
    releasing on download.gnome.org.
---
 doc/badges.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/doc/badges.py b/doc/badges.py
index 247b0e8..794b5cb 100755
--- a/doc/badges.py
+++ b/doc/badges.py
@@ -67,7 +67,7 @@ BADGE_TEMPLATE = """
 </svg>
 """
 
-URL_FORMAT = 'https://download.gnome.org/sources/BuildStream/{brief_version}/BuildStream-{full_version}.tar.xz'
+URL_FORMAT = 'https://github.com/apache/buildstream/releases/tag/{version}'
 RELEASE_COLOR = '#0040FF'
 SNAPSHOT_COLOR = '#FF8000'
 VERSION_TAG_MATCH = r'([0-9]*)\.([0-9]*)\.([0-9]*)'
@@ -135,11 +135,10 @@ def generate_badges(release):
         badge_name = 'snapshot'
         color = SNAPSHOT_COLOR
 
-    brief_version = '{major}.{minor}'.format(major=major, minor=minor)
-    full_version = '{major}.{minor}.{micro}'.format(major=major, minor=minor, micro=micro)
-    url_target = URL_FORMAT.format(brief_version=brief_version, full_version=full_version)
+    version = '{major}.{minor}.{micro}'.format(major=major, minor=minor, micro=micro)
+    url_target = URL_FORMAT.format(version=version)
     badge = BADGE_TEMPLATE.format(badge_name=badge_name,
-                                  version=full_version,
+                                  version=version,
                                   color=color,
                                   url_target=url_target)
     click.echo(badge, nl=False)