mirror of https://github.com/scrapy/scrapy.git
Merge pull request #172 from artem-dev/new_git_version
nicer deploy versions for git repos if tags are available
This commit is contained in:
commit
a6eacf2c9b
|
|
@ -150,7 +150,7 @@ def _get_version(target, opts):
|
|||
p = Popen(['hg', 'tip', '--template', '{rev}'], stdout=PIPE)
|
||||
return 'r%s' % p.communicate()[0]
|
||||
elif version == 'GIT':
|
||||
p = Popen(['git', 'rev-parse', 'HEAD'], stdout=PIPE)
|
||||
p = Popen(['git', 'describe', '--always'], stdout=PIPE)
|
||||
return '%s' % p.communicate()[0].strip('\n')
|
||||
elif version:
|
||||
return version
|
||||
|
|
|
|||
Loading…
Reference in New Issue