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)
220SED: =sed -i
321ifeq ($(UNAME_S ) ,Darwin)
422SED: =sed -i '' -e
@@ -21,10 +39,14 @@ models:
2139.PHONY : dist
2240dist :
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
0 commit comments