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
This commit is contained in:
Andrej730
2024-07-05 11:57:57 +05:00
parent ef39acfb05
commit f5b71543af
+6 -4
View File
@@ -82,11 +82,13 @@ ifeq ($(PLATFORM), win)
PYPI_PLATFORM:=--platform win_amd64 PYPI_PLATFORM:=--platform win_amd64
endif endif
# Current build commit hash.
OLD:=42b96d6
.PHONY: bump .PHONY: bump
bump: bump:
cd . && $(SED) "s/$(OLD)/$(NEW)/" Makefile cd . && $(SED) -b "s/$(OLD)/$(NEW)/" Makefile
cd ../ifcopenshell-python/ && $(SED) "s/$(OLD)/$(NEW)/" Makefile cd ../ifcopenshell-python/ && $(SED) -b "s/$(OLD)/$(NEW)/" Makefile
cd ../ifcopenshell-python/docs/ifcconvert/ && $(SED) "s/$(OLD)/$(NEW)/" installation.rst cd ../ifcopenshell-python/docs/ifcconvert/ && $(SED) -b "s/$(OLD)/$(NEW)/" installation.rst
.PHONY: dist .PHONY: dist
dist: dist:
@@ -99,7 +101,7 @@ endif
cp -r blenderbim/* dist/blenderbim/ cp -r blenderbim/* dist/blenderbim/
# Provides IfcOpenShell Python functionality # 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* cd dist/working && unzip ifcopenshell-python*
cp -r dist/working/ifcopenshell dist/blenderbim/libs/site/packages/ cp -r dist/working/ifcopenshell dist/blenderbim/libs/site/packages/