-
-
Notifications
You must be signed in to change notification settings - Fork 902
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (45 loc) · 1.67 KB
/
Makefile
File metadata and controls
49 lines (45 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# IfcSverchok - IFC Sverchok extension
# Copyright (C) 2020-2023 Dion Moult <dion@thinkmoult.com>
#
# This file is part of IfcSverchok.
#
# IfcSverchok is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# IfcSverchok 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with IfcSverchok. If not, see <http://www.gnu.org/licenses/>.
VERSION:=`date '+%y%m%d'`
IS_STABLE:=FALSE
VERSION:=$(shell cat ../../VERSION)
VERSION_MAJOR:=$(shell cat '../../VERSION' | cut -d '.' -f 1)
VERSION_MINOR:=$(shell cat '../../VERSION' | cut -d '.' -f 2)
VERSION_PATCH:=$(shell cat '../../VERSION' | cut -d '.' -f 3)
VERSION_DATE:=$(shell date '+%y%m%d')
SED:=sed -i
ifeq ($(UNAME_S),Darwin)
SED:=sed -i '' -e
endif
.PHONY: dist
dist:
rm -rf dist
mkdir -p dist/ifcsverchok
cp -r ./*.py dist/ifcsverchok/
cp -r ./nodes dist/ifcsverchok/
ifeq ($(IS_STABLE), TRUE)
cd dist/ifcsverchok && $(SED) "s/0, 0, 0/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH)/" __init__.py
cd dist && zip -r ifcsverchok-$(VERSION).zip ./*
else
cd dist/ifcsverchok && $(SED) "s/0, 0, 0/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH), $(VERSION_DATE)/" __init__.py
cd dist && zip -r ifcsverchok-$(VERSION).$(VERSION_DATE).zip ./*
endif
rm -rf dist/ifcsverchok
.PHONY: clean
clean:
rm -rf dist