forked from jub3i/csv2sql-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnpm_publish.sh
executable file
·48 lines (39 loc) · 964 Bytes
/
npm_publish.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
46
47
48
#CHECK
echo "Did you bump npm version in package.json? (Y/n):"
read answer
if [ "$answer" != "Y" ]
then
echo "Doh! Bump the version already!"
exit
fi
#CHECK
echo "Did you tag the git repo with the corresponding npm version? (Y/n):"
read answer
if [ "$answer" != "Y" ]
then
echo "Version all the things!"
exit
fi
#CHECK
echo "Are you running this script from the base directory? (beware relative paths!): (Y/n):"
read answer
if [ "$answer" != "Y" ]
then
echo "Change to base directory dumbass!"
exit
fi
TEMP_LOCATION="/tmp/csv2sql_dist"
#CLEANUP
rm -rf $TEMP_LOCATION
#COPY FILES TO TMP LOCATION
#NOTE: copy needed files explicitly
mkdir $TEMP_LOCATION
cp ./README.md $TEMP_LOCATION
cp ./LICENSE $TEMP_LOCATION
cp ./index.js $TEMP_LOCATION
cp ./package.json $TEMP_LOCATION
mkdir $TEMP_LOCATION/test/
cp ./test/fixture.csv $TEMP_LOCATION/test/
cp ./test/index.js $TEMP_LOCATION/test/
#PUBLISH THIS BAD BOY
npm publish $TEMP_LOCATION