Skip to content

Instantly share code, notes, and snippets.

@shanemhansen
Created August 14, 2014 19:24
Show Gist options
  • Save shanemhansen/3330d5edc8799631af3d to your computer and use it in GitHub Desktop.
Save shanemhansen/3330d5edc8799631af3d to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import re
version = re.compile('(?P<package>[a-zA-Z0-9_]+) \((?P<version>[^ ]+)\)')
#read release from changelog
l = open('debian/changelog').readline()[:-1]
m = re.match(version, l)
print m.group("version")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment