mirror of
https://github.com/semerad/gt3b.git
synced 2026-03-12 04:56:52 +01:00
54 lines
914 B
Bash
Executable File
54 lines
914 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 8 6; do
|
|
# make clean
|
|
# make CHANNELS=$N || exit 2
|
|
# cp -p gt3b.s19 $R/gt3b-ch$N-$V.s19
|
|
# git add $R/gt3b-ch$N-$V.s19
|
|
#done
|
|
#
|
|
# only one firmware now
|
|
cp -p gt3b.s19 $R/gt3b-$V.s19
|
|
git add $R/gt3b-$V.s19
|
|
|
|
|
|
# commit generated firmwares
|
|
git ci -am "Release: version-$V"
|
|
|
|
|
|
# tag this release
|
|
git tag version-$V
|
|
|
|
|
|
# push it to github
|
|
git push origin master
|
|
git push origin version-$V
|
|
|