diff --git a/.github/workflows/ci-bcf-pypi.yml b/.github/workflows/ci-bcf-pypi.yml index 03bff9ab75..7fed2dc053 100644 --- a/.github/workflows/ci-bcf-pypi.yml +++ b/.github/workflows/ci-bcf-pypi.yml @@ -1,24 +1,8 @@ name: ci-bcf-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 * *" - push: - paths: - - '.github/workflows/ci-bcf-pypi.yml' workflow_dispatch: -env: - major: 0 - minor: 0 - name: ifcopenshell - jobs: activate: runs-on: ubuntu-latest @@ -54,4 +38,4 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} - packages_dir: src/bcf/dist \ No newline at end of file + packages_dir: src/bcf/dist diff --git a/src/bcf/Makefile b/src/bcf/Makefile index e310fd08c1..a669362cc8 100644 --- a/src/bcf/Makefile +++ b/src/bcf/Makefile @@ -1,4 +1,22 @@ -VERSION:=`date '+%y%m%d'` +# BCF - BCF Python library +# Copyright (C) 2021 Prabhat Singh +# +# This file is part of BCF. +# +# BCF is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# BCF is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with BCF. If not, see . + +VERSION:=$(shell cat ../../VERSION) SED:=sed -i ifeq ($(UNAME_S),Darwin) SED:=sed -i '' -e @@ -21,10 +39,14 @@ models: .PHONY: dist dist: rm -rf dist - $(SED) "s/999999/$(VERSION)/" pyproject.toml + cp pyproject.toml pyproject.toml.bak + cp src/bcf/__init__.py __init__.py.bak + $(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' pyproject.toml + $(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' src/bcf/__init__.py python -m build - $(SED) "s/$(VERSION)/999999/" pyproject.toml + mv pyproject.toml.bak pyproject.toml + mv __init__.py.bak src/bcf/__init__.py # .PHONY # api: -# openapi-python-client generate --url https://api.swaggerhub.com/apis/buildingSMART/BCF/3.0 \ No newline at end of file +# openapi-python-client generate --url https://api.swaggerhub.com/apis/buildingSMART/BCF/3.0 diff --git a/src/bcf/pyproject.toml b/src/bcf/pyproject.toml index e126abe165..b5ec969a93 100644 --- a/src/bcf/pyproject.toml +++ b/src/bcf/pyproject.toml @@ -17,7 +17,7 @@ dependencies = [ "numpy", "ifcopenshell", ] -version = "0.0.999999" +version = "0.0.0" classifiers = [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", @@ -138,4 +138,4 @@ max-attributes = 10 [tool.pylint.format] expected-line-ending-format = "LF" -max-line-length = 120 \ No newline at end of file +max-line-length = 120 diff --git a/src/bcf/src/bcf/__init__.py b/src/bcf/src/bcf/__init__.py index a91684cdf7..806e3f4432 100644 --- a/src/bcf/src/bcf/__init__.py +++ b/src/bcf/src/bcf/__init__.py @@ -15,3 +15,5 @@ # # You should have received a copy of the GNU Lesser General Public License # along with BCF. If not, see . + +__version__ = version = "0.0.0"