Skip to content

Commit

Permalink
require description
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-matthewb committed Nov 7, 2015
1 parent accd96d commit e47991a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
30 changes: 19 additions & 11 deletions bin/enlist_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,21 @@ def check_svn(config):
return True


def compare_url(a,b):
def strip_url(a):
a = a.lower()
b = b.lower()
if a.startswith("http://"):
a = a[7:]
elif a.startswith("https://"):
a = a[8:]
if b.startswith("http://"):
b = b[7:]
elif b.startswith("https://"):
b = b[8:]
if a.startswith("www."):
a = a[4:]
if b.startswith("www."):
b = b[4:]
return a.lower() == b.lower()
if a.endswith(".git"):
a = a[:len(a)-4]
return a


def compare_url(a,b):
return strip_url(a) == strip_url(b)


def find_all_repos():
Expand Down Expand Up @@ -250,6 +249,7 @@ def parse_property(line):
def parse_configuration_file(config_file):
configs = []
config = None
description = None

f = open(config_file,"r")
for line in f.readlines():
Expand All @@ -261,9 +261,11 @@ def parse_configuration_file(config_file):
configs.append(config)
config = Config()
config.name = line[1:len(line)-1]
if config is None:
continue
(key,value) = parse_property(line)
if key=="description" and not config:
description = value
if not config:
continue
if key=="checkout":
config.checkout = value
elif key=="repo":
Expand All @@ -276,6 +278,12 @@ def parse_configuration_file(config_file):

if config is not None:
configs.append(config)

if not description:
print "description is empty, fix it: " + config_file
sys.exit(1)
if verbose:
print description
for config in configs:
config.validate()
return configs
Expand Down
2 changes: 2 additions & 0 deletions cds.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
description = This is the configuration for on-going CDS work, currently using labkey/release15.3

[./]
checkout = svn checkout https://hedgehog.fhcrc.org/tor/stedi/branches/release15.3

Expand Down
2 changes: 2 additions & 0 deletions modules15_3.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
description = for ongoing work on "non-core" svn modules on the stable branch

[./]
checkout = svn checkout https://hedgehog.fhcrc.org/tor/stedi/branches/modules15.3 .

Expand Down
2 changes: 2 additions & 0 deletions release15_3.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
description = stabilization/hotfix branch for release15.3

[./]
checkout = svn checkout https://hedgehog.fhcrc.org/tor/stedi/branches/release15.3 .

Expand Down
2 changes: 2 additions & 0 deletions trunk.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
description = For main-line development on the labkey trunk, incldues most common git modules

[./]
checkout = svn checkout https://hedgehog.fhcrc.org/tor/stedi/trunk .

Expand Down

0 comments on commit e47991a

Please sign in to comment.