Skip to content

Commit 3c659a3

Browse files
committed
BCF workflow now uses VERSION
1 parent d192217 commit 3c659a3

4 files changed

Lines changed: 31 additions & 23 deletions

File tree

.github/workflows/ci-bcf-pypi.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
name: ci-bcf-pypi
22

33
on:
4-
schedule:
5-
# ┌───────────── minute (0 - 59)
6-
# │ ┌───────────── hour (0 - 23)
7-
# │ │ ┌───────────── day of the month (1 - 31)
8-
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
9-
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
10-
# * * * * *
11-
- cron: "0 0 18 * *"
12-
push:
13-
paths:
14-
- '.github/workflows/ci-bcf-pypi.yml'
154
workflow_dispatch:
165

17-
env:
18-
major: 0
19-
minor: 0
20-
name: ifcopenshell
21-
226
jobs:
237
activate:
248
runs-on: ubuntu-latest
@@ -54,4 +38,4 @@ jobs:
5438
with:
5539
user: __token__
5640
password: ${{ secrets.PYPI_API_TOKEN }}
57-
packages_dir: src/bcf/dist
41+
packages_dir: src/bcf/dist

src/bcf/Makefile

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
VERSION:=`date '+%y%m%d'`
1+
# BCF - BCF Python library
2+
# Copyright (C) 2021 Prabhat Singh <singh01prabhat@gmail.com>
3+
#
4+
# This file is part of BCF.
5+
#
6+
# BCF is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU Lesser General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# BCF is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU Lesser General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU Lesser General Public License
17+
# along with BCF. If not, see <http://www.gnu.org/licenses/>.
18+
19+
VERSION:=$(shell cat ../../VERSION)
220
SED:=sed -i
321
ifeq ($(UNAME_S),Darwin)
422
SED:=sed -i '' -e
@@ -21,10 +39,14 @@ models:
2139
.PHONY: dist
2240
dist:
2341
rm -rf dist
24-
$(SED) "s/999999/$(VERSION)/" pyproject.toml
42+
cp pyproject.toml pyproject.toml.bak
43+
cp src/bcf/__init__.py __init__.py.bak
44+
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' pyproject.toml
45+
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' src/bcf/__init__.py
2546
python -m build
26-
$(SED) "s/$(VERSION)/999999/" pyproject.toml
47+
mv pyproject.toml.bak pyproject.toml
48+
mv __init__.py.bak src/bcf/__init__.py
2749

2850
# .PHONY
2951
# api:
30-
# openapi-python-client generate --url https://api.swaggerhub.com/apis/buildingSMART/BCF/3.0
52+
# openapi-python-client generate --url https://api.swaggerhub.com/apis/buildingSMART/BCF/3.0

src/bcf/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies = [
1717
"numpy",
1818
"ifcopenshell",
1919
]
20-
version = "0.0.999999"
20+
version = "0.0.0"
2121
classifiers = [
2222
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
2323
"Operating System :: OS Independent",
@@ -138,4 +138,4 @@ max-attributes = 10
138138

139139
[tool.pylint.format]
140140
expected-line-ending-format = "LF"
141-
max-line-length = 120
141+
max-line-length = 120

src/bcf/src/bcf/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@
1515
#
1616
# You should have received a copy of the GNU Lesser General Public License
1717
# along with BCF. If not, see <http://www.gnu.org/licenses/>.
18+
19+
__version__ = version = "0.0.0"

0 commit comments

Comments
 (0)