From f5b71543af913ab3843b1efd9d1d053a7538b525 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 5 Jul 2024 11:57:57 +0500 Subject: [PATCH] makefile "bump" target changes 1) added current commit hash as a variable to the makefile, so you can now just `make bump NEW=xxxx` to bump the build version instead of `make bump OLD=yyyy NEW=xxxx`. 2) added binary mode to sed command, so it won't be changing current line endings --- src/blenderbim/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/blenderbim/Makefile b/src/blenderbim/Makefile index 0f430eb567..e066f56afa 100644 --- a/src/blenderbim/Makefile +++ b/src/blenderbim/Makefile @@ -82,11 +82,13 @@ ifeq ($(PLATFORM), win) PYPI_PLATFORM:=--platform win_amd64 endif +# Current build commit hash. +OLD:=42b96d6 .PHONY: bump bump: - cd . && $(SED) "s/$(OLD)/$(NEW)/" Makefile - cd ../ifcopenshell-python/ && $(SED) "s/$(OLD)/$(NEW)/" Makefile - cd ../ifcopenshell-python/docs/ifcconvert/ && $(SED) "s/$(OLD)/$(NEW)/" installation.rst + cd . && $(SED) -b "s/$(OLD)/$(NEW)/" Makefile + cd ../ifcopenshell-python/ && $(SED) -b "s/$(OLD)/$(NEW)/" Makefile + cd ../ifcopenshell-python/docs/ifcconvert/ && $(SED) -b "s/$(OLD)/$(NEW)/" installation.rst .PHONY: dist dist: @@ -99,7 +101,7 @@ endif cp -r blenderbim/* dist/blenderbim/ # Provides IfcOpenShell Python functionality - cd dist/working && wget https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-$(PYNUMBER)-v$(VERSION)-42b96d6-$(PLATFORM)64.zip + cd dist/working && wget https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-$(PYNUMBER)-v$(VERSION)-${OLD}-$(PLATFORM)64.zip cd dist/working && unzip ifcopenshell-python* cp -r dist/working/ifcopenshell dist/blenderbim/libs/site/packages/