Skip to content

Commit

Permalink
the-powder-toy.py: Scan GitHub for upstream versions
Browse files Browse the repository at this point in the history
From now on each new release is tagged on GitHub.
Unfortunately, the tag name is not based on the version but
on the build number. So we still need this upstream watcher
to pick the version from the tag description instead.
This also returns an invalid URL but just removing the
version brings you to the tag download page on GitHub for
the PowderToypp project.
  • Loading branch information
Christoph Korn committed Nov 15, 2012
1 parent aa60f1e commit 727bad3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions the-powder-toy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import re
import urllib2
import sys
h=urllib2.urlopen("http://powdertoy.co.uk/").read()
v_finder=re.compile('<p class="extra-links">(?P<version>[\d\.]+) ', re.M)
h=urllib2.urlopen("https://github.com/FacialTurd/PowderToypp/tags").read()
v_finder=re.compile('Version (?P<version>[\d\.]+) (?:.*)\(build (?P<build>[\d]+)\)', re.M)
m=v_finder.finditer(h)
if not m: sys.exit()
for x in m:
v=x.group("version")
print "<a href='http://powdertoy.co.uk/%s'>%s</a>"%(v,v)
print "<a href='https://github.com/FacialTurd/PowderToypp/tags/%s'>%s</a>"%(v,v)

0 comments on commit 727bad3

Please sign in to comment.