forked from letscontrolit/ESPEasy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
before_deploy
executable file
·52 lines (43 loc) · 1.14 KB
/
before_deploy
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
#!/bin/bash
VERSION=$(git describe)
#Naming convention:
# ESP_Easy_[github version]_[plugin set]_[chip type]_[flash memory].bin
for ENV in \
normal_ESP8266_1024 \
normal_ESP8266_4096 \
normal_ESP8285_1024 \
normal_IR_ESP8266_4096 \
test_ESP8266_1024\
test_ESP8266_4096\
test_ESP8266_4096_VCC\
test_ESP8285_1024\
dev_ESP8266_1024\
dev_ESP8266_4096\
dev_ESP8285_1024\
dev_ESP8266PUYA_1024\
dev_ESP8266PUYA_1024_VCC\
hard_SONOFF_POW\
hard_Shelly_1\
esp32dev\
esp32test_1M8_partition;\
do
echo
echo "### Deploying environment $ENV for version $VERSION"
BIN=.pioenvs/${ENV}/ESP_Easy_${VERSION}_${ENV}.bin
cp .pioenvs/${ENV}/firmware.bin $BIN
python2 crc2.py $BIN
mv $BIN "dist/ESP_Easy_${VERSION}_${ENV}.bin"
done
#create a source structure that is the same as the original ESPEasy project (and works with the howto on the wiki)
#rm -rf dist/Source 2>/dev/null
rm -rf dist/Docs 2>/dev/null
mkdir -p dist/Source
#mkdir -p dist/Docs
cp -r lib dist/Source/
cp -r src dist/Source/
#cp -r docs/build/ dist/Docs/
cp platformio.ini dist/Source/
cd dist
echo
echo "### Creating zip archive"
zip ../ESPEasy_$VERSION.zip -r .