Files
gt3b/build

45 lines
745 B
Bash
Executable File

#!/bin/bash
#
# build firmwares for version
R=Releases
V=$(grep '#define VERSION' version.h | cut -d\" -f2 | \
sed 's/^\(.\)\(.\)\(.\)$/\1.\2.\3/')
# check, if not already released
if [ -f $R/MANUAL-$V.txt -a x"$1" != "x--force" ]; then
echo "Version '$V' already released !!!" >&2
exit 1
fi
# manual
cp -p MANUAL.txt $R/MANUAL-$V.txt
git add $R/MANUAL-$V.txt
# ChangeLog - only copy to have it in the Release directory
cp -p ChangeLog $R/ChangeLog.txt
# firmwares for more max channels
for N in 3 6; do
make clean
make CHANNELS=$N
cp -p gt3b.s19 $R/gt3b-ch$N-$V.s19
git add $R/gt3b-ch$N-$V.s19
done
# commit generated firmwares
git ci -am "Release: version-$V"
# tag this release
git tag version-$V