Skip to content

Commit

Permalink
run git describe in Makefile
Browse files Browse the repository at this point in the history
make is always run from the src-dir, so capture git desc output there,
then it might be usable in the install target.

ATM this just echos GIT_VERSION, but it could be passed as an ENVAR=
into pip install via INSTALL_ARGS.

Maybe pip install can add this into the package info ?

Signed-off-by: Jim Cromie <[email protected]>
  • Loading branch information
jimc committed Jul 23, 2024
1 parent 840756b commit 0148f15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
INSTALL_ARGS := # todo: add --break-system-packages if ubuntu

# Get git version information for make install
GIT_DESCRIBE := $(shell git describe --always --long --dirty)

.PHONY: init
init:
cd virtme_ng_init && cargo install --path . --root ../virtme/guest

# see README.md '* Install from source'
install: install_from_source
install_from_source:
@echo "Version: $(GIT_DESCRIBE)"
BUILD_VIRTME_NG_INIT=1 pip3 install --verbose -r requirements.txt $(INSTALL_ARGS) .

0 comments on commit 0148f15

Please sign in to comment.