New VERSION file and make BBBIM and docs based on version string

This commit is contained in:
Dion Moult
2024-06-11 00:09:20 +10:00
parent 8067d0c4f6
commit 293cee414a
6 changed files with 25 additions and 10 deletions
+14 -3
View File
@@ -35,7 +35,12 @@ SED:=sed -i '' -e
endif
endif
VERSION:=`date '+%y%m%d'`
IS_DEV_BUILD:=TRUE
VERSION:=`cat '../../VERSION'`
VERSION_MAJOR:=`cat '../../VERSION' | cut -d '.' -f 1`
VERSION_MINOR:=`cat '../../VERSION' | cut -d '.' -f 2`
VERSION_PATCH:=`cat '../../VERSION' | cut -d '.' -f 3`
VERSION_DATE:=`date '+%y%m%d'`
LAST_COMMIT_HASH:=$(shell git rev-parse HEAD)
PYVERSION:=py310
PYPI_IMP:=cp
@@ -281,10 +286,16 @@ endif
rm -rf dist/blenderbim/libs/site/packages/numpy
rm -rf dist/blenderbim/libs/site/packages/numpy.libs
cd dist/blenderbim && $(SED) "s/999999/$(VERSION)/" __init__.py
cd dist/blenderbim && $(SED) "s/999999/$(VERSION)/" blender_manifest.toml
ifeq ($(IS_DEV_BUILD), TRUE)
cd dist/blenderbim && $(SED) "s/9, 9, 9/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH), $(VERSION_DATE)/" __init__.py
cd dist/blenderbim && $(SED) "s/9.9.9/$(VERSION).$(VERSION_DATE)/" blender_manifest.toml
cd dist/blenderbim/bim && $(SED) "s/8888888/$(LAST_COMMIT_HASH)/" __init__.py
cd dist && zip -r blenderbim-$(VERSION).$(VERSION_DATE)-$(PYVERSION)-$(PLATFORM).zip ./*
else
cd dist/blenderbim && $(SED) "s/9, 9, 9/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH)/" __init__.py
cd dist/blenderbim && $(SED) "s/9.9.9/$(VERSION)/" blender_manifest.toml
cd dist && zip -r blenderbim-$(VERSION)-$(PYVERSION)-$(PLATFORM).zip ./*
endif
rm -rf dist/blenderbim
.PHONY: test