osclib/common: provide version_calcuate() and utilize by default.
This commit is contained in:
parent
6e8e461e1c
commit
37386e0c74
2
Makefile
2
Makefile
@ -18,7 +18,7 @@ install:
|
||||
for i in osc-*.py osclib; do ln -s $(pkgdatadir)/$$i $(DESTDIR)$(oscplugindir)/$$i; done
|
||||
for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
|
||||
install -m 644 systemd/* $(DESTDIR)$(unitdir)
|
||||
sed -i "s/VERSION = '.*'/VERSION = '$(VERSION)'/" \
|
||||
sed -i "s/VERSION = .*/VERSION = '$(VERSION)'/" \
|
||||
$(DESTDIR)$(pkgdatadir)/osclib/common.py
|
||||
for i in $(pkgdata_BINS); do ln -s $(pkgdatadir)/$$i $(DESTDIR)$(bindir)/osrt-$${i%.*}; done
|
||||
install -m 755 script/* $(DESTDIR)$(bindir)
|
||||
|
@ -1,2 +1,14 @@
|
||||
NAME = 'openSUSE-release-tools'
|
||||
VERSION = '0.0.0-dev'
|
||||
|
||||
def version_calculate():
|
||||
from os import path
|
||||
if path.exists('.git'):
|
||||
from osclib.git import describe
|
||||
try:
|
||||
return describe()
|
||||
except FileNotFoundError:
|
||||
pass # Fall through to final return.
|
||||
|
||||
return '0.0.0-dev'
|
||||
|
||||
VERSION = version_calculate()
|
||||
|
Loading…
x
Reference in New Issue
Block a user