forked from sdavi/DuetWiFiSocketServer
-
Notifications
You must be signed in to change notification settings - Fork 14
/
BuildRelease.sh
executable file
·48 lines (39 loc) · 1.3 KB
/
BuildRelease.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
#!/bin/sh
#extract firmware version from header file
VER=`awk 'sub(/.*VERSION_MAIN/,""){print $1}' src/Config.h | awk 'gsub(/"/, "", $1)'`
OUTPUT=releases/${VER}
mkdir -p ${OUTPUT}
rm -f ${OUTPUT}/*
#Building LPC Firmware
#make BUILD=relbuild clean
#make -j2 BUILD=relbuild HOSTSYS=-DLPCRRF
#if [ -f ./relbuild/DuetWiFiServer.bin ]; then
# mv ./relbuild/DuetWiFiServer.bin ${OUTPUT}/DuetWiFiServer-lpc.bin
#fi
#Building LPC Firmware with extended listen
make BUILD=build clean
make -j2 BUILD=build HOSTSYS="-DLPCRRF -DEXTENDED_LISTEN"
if [ -f ./build/DuetWiFiServer.bin ]; then
mv ./build/DuetWiFiServer.bin ${OUTPUT}/DuetWiFiServer-esp8266-lpc-${VER}.bin
fi
#Building STM32F4 Firmware
make BUILD=build clean
make -j2 BUILD=build HOSTSYS=-DSTM32F4
if [ -f ./build/DuetWiFiServer.bin ]; then
mv ./build/DuetWiFiServer.bin ${OUTPUT}/DuetWiFiServer-esp8266-stm32-${VER}.bin
fi
#Building Duet firmware
#make BUILD=build clean
#make -j2 BUILD=build HOSTSYS=
#if [ -f ./relbuild/DuetWiFiServer.bin ]; then
# mv ./build/DuetWiFiServer.bin ${OUTPUT}/DuetWiFiServer-esp8256-duet.bin
#fi
make BUILD=build clean
# Building esp32 version (ugly!)
cmd << EOFXXX
.\buildesp32.cmd
EOFXXX
if [ -f ./build/DuetWiFiServer.bin ]; then
mv ./build/DuetWiFiServer.bin ${OUTPUT}/DuetWiFiServer-esp32-stm32-${VER}.bin
fi
make BUILD=build clean