Skip to content

Commit

Permalink
chore(Makefile): use setup.cfg to get/set version
Browse files Browse the repository at this point in the history
  • Loading branch information
mkniewallner committed Sep 24, 2021
1 parent 779d542 commit 50f0c46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ clean:

.PHONY: set-dev-version
set-dev-version:
bash -c "sed -i -e 's!^\(\s*_VERSION = \).*!\1\"$(shell $(MAKE) get-version).dev$(shell date +\"%s\")\"!' setup.py"
@bash -c "sed -i -e 's!^\(\s*version = \).*!\1$(shell $(MAKE) get-version).dev$(shell date +\"%s\")!' setup.cfg"

.PHONY: run-docs
run-docs:
docker-compose up docs

.PHONY: get-version
get-version:
@echo $(shell cat setup.py | grep "_VERSION =" | egrep -o '[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?')
@echo $(shell cat setup.cfg | grep "version =" | egrep -o '[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?')

0 comments on commit 50f0c46

Please sign in to comment.