forked from netmaniac/arduino-tiny
-
Notifications
You must be signed in to change notification settings - Fork 4
/
do-deploy.sh
executable file
·74 lines (52 loc) · 1.35 KB
/
do-deploy.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env bash
BASENAME="tinyBrdCore"
BOARD_MANAGER_SUFFIX="bm"
while getopts "h?t:" opt; do
case "$opt" in
h|\?)
exit 0
;;
t) ans=$OPTARG
;;
esac
done
if [ $ans ]; then
echo "Nazwa wersji: $ans"
echo "Nacisnij <ENTER> by kontynuować"
read
else
echo "Tagi z GITa:"
echo
git tag
echo "---------"
echo "Podaj numer wersji. Będzie częscią pliku"
read ans
fi
BM_DIRECTORY="$BASENAME-$BOARD_MANAGER_SUFFIX-$ans"
LIB="$BASENAME-$ans".zip
echo "Katalog dla BM: $BM_DIRECTORY"
rm -f *.zip
zip -qr $LIB NettigoTinyBrd
cp -fR NettigoTinyBrd $BM_DIRECTORY
cd $BM_DIRECTORY/avr && mv * .. && cd .. && rm -fR avr && cd ..
zip -qr $BM_DIRECTORY.zip $BM_DIRECTORY
rm -fR $BM_DIRECTORY
echo "Lista plików"
ls -1 *zip
echo "OK? (y/n)"
read confirm
host="static.nettigo.pl"
PACKAGE="package_nettigo.pl_index.json"
if [ "$confirm" = "y" ]; then
ruby tools/package.rb -f $BM_DIRECTORY.zip -v $ans > $PACKAGE
# scp $LIB ${host}:NTG-STATIC/tinybrd/cores/$LIB
# scp $BM_DIRECTORY.zip ${host}:NTG-STATIC/tinybrd/cores/$BM_DIRECTORY.zip
# scp $PACKAGE ${host}:NTG-STATIC/tinybrd/
# ssh -C $host "cd NTG-STATIC/
# rm tinyBrd-current.zip
# ln -s tinybrd/cores/$LIB tinyBrd-current.zip
# "
fi
exit 0
./do-release.sh
scp *.zip static.nettigo.pl:NTG-STATIC/