Commit d718023e authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

relnotes: Fix parsing of Version: field from Cabal file

Subscribers: rwbarton, thomie, carter

Differential Revision:
parent 6a71ef79
......@@ -8,13 +8,13 @@ from utils import build_table_from_list
def read_cabal_file(pkg_path):
import re
cabal_file = open(pkg_path, 'r').read()
pkg_name ='[nN]ame:\s*([-a-zA-Z0-9]+)', cabal_file)
pkg_name ='^[nN]ame\s*:\s*([-a-zA-Z0-9]+)', cabal_file, re.MULTILINE)
if pkg_name is not None:
pkg_name =
raise RuntimeError("Failed to parse `Name:` field from %s" % pkg_path)
pkg_version ='[vV]ersion:\s*(\d+(\.\d+)*)', cabal_file)
pkg_version ='^[vV]ersion\s*:\s*(\d+(\.\d+)*)', cabal_file, re.MULTILINE)
if pkg_version is not None:
pkg_version =
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment