todo.sh: Generate version info at dist time.
When generating the distribution files, prepare todo.sh by subbing in the current version so that users will get a proper version number. Tries to detect VERSION-FILE for running from the development directory but this doesn't work well when $PWD is not the top of the git repo. Signed-off-by: Emil Sit <sit@emilsit.net>
This commit is contained in:
3
Makefile
3
Makefile
@@ -13,12 +13,13 @@ VERSION-FILE: .FORCE-VERSION-FILE
|
||||
todo.sh: VERSION-FILE
|
||||
|
||||
# For packaging
|
||||
DISTFILES := README todo.cfg todo.sh
|
||||
DISTFILES := README todo.cfg
|
||||
|
||||
DISTNAME=todo.sh-$(VERSION)
|
||||
dist: $(DISTFILES) todo.sh
|
||||
mkdir -p $(DISTNAME)
|
||||
cp -f $(DISTFILES) $(DISTNAME)/
|
||||
sed -e 's/@DEV_VERSION@/'$(VERSION)'/' todo.sh > $(DISTNAME)/todo.sh
|
||||
tar cf $(DISTNAME).tar $(DISTNAME)/
|
||||
gzip -f -9 $(DISTNAME).tar
|
||||
zip -9r $(DISTNAME).zip $(DISTNAME)/
|
||||
|
||||
Reference in New Issue
Block a user