Fix buck build when referring SNAPSHOT version

When referring to a maven SNAPSHOT version where the
version string contains an additional part, e.g. for a
company internal patch, buck incorrectly calculated the path: Buck
replaced everything after the first '-' of the version with
'-SNAPSHOT'. 

An example is
'gwtorm:gwtorm:1.8.0-sap-01-SNAPSHOT-20130927.083646-2'

Now we remove everything after '-SNAPSHOT'.

Change-Id: I8a200d46139bf476d7824469ee5a7380891ea46d
This commit is contained in:
Stefan Lay 2013-10-01 11:25:35 +02:00
parent 96e70cc532
commit 49752be37e

View File

@ -47,7 +47,7 @@ def maven_jar(
if 'SNAPSHOT' in version:
file_version = version.replace('-SNAPSHOT', '')
version = version.split('-')[0] + '-SNAPSHOT'
version = version.split('-SNAPSHOT')[0] + '-SNAPSHOT'
else:
file_version = version