-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (34 loc) · 1.14 KB
/
Makefile
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
VERSION=$(shell jq -r .version < package.json)
all: build
prepare:
npm i
build: clean-dist build-js done
clean-dist:
rm -f index.min.js index.min.tmp.js
build-js:
./node_modules/.bin/webpack
echo "// eva-hmi-block_ui `jq < package.json -r .version`" > index.min.js
cat index.min.tmp.js >> index.min.js
rm -f index.min.tmp.js
done:
@which figlet > /dev/null && figlet -f slant "DONE" || echo -e "-----------------\nDONE"
release: pub build ver-pub pkg pub-pkg
pub:
npm version --no-git-tag-version patch
npm publish --access public
clean:
rm -rf package-lock.json node_modules
ver-pub:
git commit -a -m "version `jq < package.json -r .version`";
git push
pkg:
rm -rf _build
mkdir -p _build/ui/apps/eva-hmi-block_ui
cp -r index.min.js themes examples doc _build/ui/apps/eva-hmi-block_ui/
sed "s/^VERSION=.*/VERSION='$(VERSION)'/g" setup.py > _build/setup.py
cd _build && tar czf eva-hmi-block_ui-$(VERSION).evapkg ui setup.py
cd _build && tar czf eva-hmi-block_ui-$(VERSION).tgz ui
pub-pkg:
echo "" | gh release create v$(VERSION) -t "v$(VERSION)" \
_build/eva-hmi-block_ui-$(VERSION).evapkg \
_build/eva-hmi-block_ui-$(VERSION).tgz