mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix #4511. IfcOpenShell builds now read from the VERSION file and expose a __version__ var.
This commit is contained in:
@@ -36,11 +36,11 @@ endif
|
||||
endif
|
||||
|
||||
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'`
|
||||
VERSION:=$(shell cat ../../VERSION)
|
||||
VERSION_MAJOR:=$(shell cat '../../VERSION' | cut -d '.' -f 1)
|
||||
VERSION_MINOR:=$(shell cat '../../VERSION' | cut -d '.' -f 2)
|
||||
VERSION_PATCH:=$(shell cat '../../VERSION' | cut -d '.' -f 3)
|
||||
VERSION_DATE:=$(shell date '+%y%m%d')
|
||||
LAST_COMMIT_HASH:=$(shell git rev-parse HEAD)
|
||||
PYVERSION:=py310
|
||||
PYPI_IMP:=cp
|
||||
@@ -287,13 +287,13 @@ endif
|
||||
rm -rf dist/blenderbim/libs/site/packages/numpy.libs
|
||||
|
||||
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 && $(SED) "s/0, 0, 0/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH), $(VERSION_DATE)/" __init__.py
|
||||
cd dist/blenderbim && $(SED) "s/0.0.0/$(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/blenderbim && $(SED) "s/0, 0, 0/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH)/" __init__.py
|
||||
cd dist/blenderbim && $(SED) "s/0.0.0/$(VERSION)/" blender_manifest.toml
|
||||
cd dist && zip -r blenderbim-$(VERSION)-$(PYVERSION)-$(PLATFORM).zip ./*
|
||||
endif
|
||||
rm -rf dist/blenderbim
|
||||
|
||||
@@ -38,7 +38,7 @@ bl_info = {
|
||||
"description": "Transforms Blender into a native Building Information Model authoring platform using IFC.",
|
||||
"author": "IfcOpenShell Contributors",
|
||||
"blender": (3, 1, 0),
|
||||
"version": (9, 9, 9),
|
||||
"version": (0, 0, 0),
|
||||
"location": "File Menu, Scene Properties Tab. See documentation for more.",
|
||||
"doc_url": "https://docs.blenderbim.org/",
|
||||
"tracker_url": "https://github.com/IfcOpenShell/IfcOpenShell/issues",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
schema_version = "1.0.0"
|
||||
id = "blenderbim"
|
||||
version = "9.9.9"
|
||||
version = "0.0.0"
|
||||
name = "BlenderBIM"
|
||||
tagline = "Transforms Blender into a native Building Information Model authoring platform using IFC."
|
||||
maintainer = "Dion Moult <dion@thinkmoult.com>"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
VERSION:=`date '+%y%m%d'`
|
||||
PYVERSION:=py310
|
||||
VERSION:=$(shell cat ../../VERSION)
|
||||
PYVERSION:=py311
|
||||
PLATFORM:=linux
|
||||
|
||||
SED:=sed -i
|
||||
@@ -101,11 +101,13 @@ endif
|
||||
# distutils cannot access anything outside the cwd, so hackishly swap out the README.md
|
||||
cp README.md ../README.bak
|
||||
cp ../../README.md README.md
|
||||
$(SED) "s/999999/$(VERSION)/" pyproject.toml
|
||||
cp pyproject.toml pyproject.toml.bak
|
||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' pyproject.toml
|
||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' dist/ifcopenshell/__init__.py
|
||||
python -m build
|
||||
$(SED) "s/$(VERSION)/999999/" pyproject.toml
|
||||
mv pyproject.toml.bak pyproject.toml
|
||||
mv ../README.bak README.md
|
||||
cd dist && mv ifcopenshell-0.7.0.$(VERSION)-py3-none-any.whl ifcopenshell-0.7.0.$(VERSION)-$(PYVERSION)-none-$(PLATFORMTAG).whl
|
||||
cd dist && mv ifcopenshell-$(VERSION)-py3-none-any.whl ifcopenshell-$(VERSION)-$(PYVERSION)-none-$(PLATFORMTAG).whl
|
||||
rm -rf dist/ifcopenshell
|
||||
rm -rf dist/ifcopenshell.egg-info
|
||||
rm -rf dist/ifcopenshell-0.7.0.$(VERSION).tar.gz
|
||||
rm -rf dist/ifcopenshell-$(VERSION).tar.gz
|
||||
|
||||
@@ -284,5 +284,6 @@ def guess_format(path: Path) -> Union[str, None]:
|
||||
return None
|
||||
|
||||
|
||||
version = ifcopenshell_wrapper.version()
|
||||
version_core = ifcopenshell_wrapper.version()
|
||||
__version__ = version = "0.0.0"
|
||||
get_log = ifcopenshell_wrapper.get_log
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "ifcopenshell"
|
||||
version = "0.7.0.999999"
|
||||
version = "0.0.0"
|
||||
authors = [
|
||||
{ name="Dion Moult", email="dion@thinkmoult.com" },
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user