mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
Sonoff POW build now is usable for both POW and POW r2. Use the Reset Factory default to select proper pre-defined setup for keys and relay. Both power sensors are included as plugin.
71 lines
1.5 KiB
Bash
Executable File
71 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
VERSION=$(git describe)
|
|
TMP_DIST=`mktemp -d`
|
|
CURPATH=`pwd`
|
|
|
|
if [ ! -d ${TMP_DIST} ]; then
|
|
# Could not create temp dir, so exit
|
|
exit 1
|
|
fi
|
|
|
|
#Naming convention:
|
|
# ESP_Easy_[github version]_[plugin set]_[chip type]_[flash memory].bin
|
|
|
|
mkdir -p ${TMP_DIST}
|
|
cp -r dist/* ${TMP_DIST}/
|
|
|
|
if [ -d "docs/build" ]; then
|
|
# Docs have been created
|
|
mkdir -p ${TMP_DIST}/docs
|
|
cp -r docs/build/* ${TMP_DIST}/docs/
|
|
fi
|
|
|
|
|
|
for ENV in \
|
|
normal_ESP8266_1024 \
|
|
normal_ESP8266_4096 \
|
|
normal_ESP8285_1024 \
|
|
normal_IR_ESP8266_4096 \
|
|
normal_core_241_ESP8266_1024 \
|
|
normal_core_241_ESP8266_4096 \
|
|
test_ESP8266_1024\
|
|
test_ESP8266_4096\
|
|
test_ESP8266_4096_VCC\
|
|
test_ESP8266_1024_VCC\
|
|
test_ESP8285_1024\
|
|
dev_ESP8266_1024\
|
|
dev_ESP8266_4096\
|
|
dev_ESP8285_1024\
|
|
hard_SONOFF_POW_4M\
|
|
minimal_ESP8266_1024_OTA\
|
|
minimal_ESP8285_1024_OTA\
|
|
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 "${TMP_DIST}/bin/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
|
|
|
|
mkdir -p ${TMP_DIST}/source
|
|
cp -r lib ${TMP_DIST}/source/
|
|
cp -r src ${TMP_DIST}/source/
|
|
cp platformio.ini ${TMP_DIST}/source/
|
|
|
|
cd ${TMP_DIST}
|
|
|
|
echo
|
|
echo "### Creating zip archive"
|
|
zip ${CURPATH}/ESPEasy_$VERSION.zip -r .
|
|
|
|
rm -Rf ${TMP_DIST}/* 2>/dev/null
|
|
rmdir ${TMP_DIST}
|