From 85e1786ce5d4173baa89e3a26beaec8fdeb480ad Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Wed, 12 Jun 2024 18:05:33 +1000 Subject: [PATCH] IfcPatch workflow now uses VERSION --- .github/workflows/ci-ifcpatch-pypi.yaml | 13 ------------- src/ifcpatch/Makefile | 10 +++++++--- src/ifcpatch/ifcpatch/__init__.py | 3 +++ src/ifcpatch/pyproject.toml | 2 +- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-ifcpatch-pypi.yaml b/.github/workflows/ci-ifcpatch-pypi.yaml index 710c3fba74..2b39a77bea 100644 --- a/.github/workflows/ci-ifcpatch-pypi.yaml +++ b/.github/workflows/ci-ifcpatch-pypi.yaml @@ -1,21 +1,8 @@ name: ci-ifcpatch-pypi on: - schedule: - # ┌───────────── minute (0 - 59) - # │ ┌───────────── hour (0 - 23) - # │ │ ┌───────────── day of the month (1 - 31) - # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) - # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) - # * * * * * - - cron: "0 0 18 * *" workflow_dispatch: -env: - major: 0 - minor: 0 - name: ifcopenshell - jobs: activate: runs-on: ubuntu-latest diff --git a/src/ifcpatch/Makefile b/src/ifcpatch/Makefile index 385ed3ac1c..a55e7ea17a 100644 --- a/src/ifcpatch/Makefile +++ b/src/ifcpatch/Makefile @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcPatch. If not, see . -VERSION:=`date '+%y%m%d'` +VERSION:=$(shell cat ../../VERSION) SED:=sed -i ifeq ($(UNAME_S),Darwin) SED:=sed -i '' -e @@ -33,6 +33,10 @@ qa: .PHONY: dist dist: rm -rf dist - $(SED) "s/999999/$(VERSION)/" pyproject.toml + cp pyproject.toml pyproject.toml.bak + cp ifcpatch/__init__.py __init__.py.bak + $(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' pyproject.toml + $(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' ifcpatch/__init__.py python -m build - $(SED) "s/$(VERSION)/999999/" pyproject.toml + mv pyproject.toml.bak pyproject.toml + mv __init__.py.bak ifcpatch/__init__.py diff --git a/src/ifcpatch/ifcpatch/__init__.py b/src/ifcpatch/ifcpatch/__init__.py index 4fd9bf187c..9efabf19da 100644 --- a/src/ifcpatch/ifcpatch/__init__.py +++ b/src/ifcpatch/ifcpatch/__init__.py @@ -29,6 +29,9 @@ import importlib from typing import Union +__version__ = version = "0.0.0" + + def execute(args: dict) -> Union[ifcopenshell.file, str]: """Execute a patch recipe diff --git a/src/ifcpatch/pyproject.toml b/src/ifcpatch/pyproject.toml index 25c9bb982c..8329ba63d0 100644 --- a/src/ifcpatch/pyproject.toml +++ b/src/ifcpatch/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ifcpatch" -version = "0.0.999999" +version = "0.0.0" authors = [ { name="Dion Moult", email="dion@thinkmoult.com" }, ]