forked from dpjanes/homestar-denon-avr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DIST.sh
45 lines (36 loc) · 786 Bytes
/
DIST.sh
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
#
# DIST.sh
#
# David Janes
# IOTDB
# 2015-02-10
#
PACKAGE=homestar-denon-avr
DIST_ROOT=/var/tmp/.dist.$$
if [ ! -d "$DIST_ROOT" ]
then
mkdir "$DIST_ROOT"
fi
echo "=================="
echo "NPM Packge: $PACKAGE"
echo "=================="
(
NPM_DST="$DIST_ROOT/$PACKAGE"
echo "NPM_DST=$NPM_DST"
if [ -d ${NPM_DST} ]
then
rm -rf "${NPM_DST}"
fi
mkdir "${NPM_DST}" || exit 1
update-package --increment-version --package "$PACKAGE" --homestar || exit 1
tar cf - \
README.md LICENSE homestar.json package.json \
DenonAVRBridge.js index.js \
models/*js \
|
( cd "${NPM_DST}" && tar xvf - )
## cp dist/*.* "${NPM_DST}" || exit 1
cd "${NPM_DST}" || exit 1
npm publish
echo "end"
)