Tools: get version exclusively from version.h

This commit is contained in:
Lucas De Marchi 2016-05-06 13:19:11 -03:00
parent ff46384258
commit b07acea6b6
5 changed files with 5 additions and 5 deletions

View File

@ -112,7 +112,7 @@ addfwversion() {
git log -1 > "$destdir/git-version.txt"
[ -f APM_Config.h ] && {
shopt -s nullglob
version=$(grep 'define.THISFIRMWARE' *.pde *.h 2> /dev/null | cut -d'"' -f2)
version=$(grep 'define.THISFIRMWARE' version.h 2> /dev/null | cut -d'"' -f2)
echo >> "$destdir/git-version.txt"
echo "APMVERSION: $version" >> "$destdir/git-version.txt"
python $BASEDIR/Tools/PrintVersion.py >"$destdir/firmware-version.txt"

View File

@ -73,7 +73,7 @@ build_devrelease() {
git log -1 > "$SUBDIR/git-version.txt" || return 1
[ -f APM_Config.h ] && {
shopt -s nullglob
version=$(grep 'define.THISFIRMWARE' *.pde *.h 2> /dev/null | cut -d'"' -f2)
version=$(grep 'define.THISFIRMWARE' version.h 2> /dev/null | cut -d'"' -f2)
echo >> "$SUBDIR/git-version.txt"
echo "APMVERSION: $version" >> "$SUBDIR/git-version.txt"
}

View File

@ -81,7 +81,7 @@ addfwversion() {
git log -1 > "$destdir/git-version.txt"
[ -f APM_Config.h ] && {
shopt -s nullglob
version=$(grep 'define.THISFIRMWARE' *.pde *.h 2> /dev/null | cut -d'"' -f2)
version=$(grep 'define.THISFIRMWARE' version.h 2> /dev/null | cut -d'"' -f2)
echo >> "$destdir/git-version.txt"
echo "APMVERSION: $version" >> "$destdir/git-version.txt"
}

View File

@ -81,7 +81,7 @@ addfwversion() {
git log -1 > "$destdir/git-version.txt"
[ -f APM_Config.h ] && {
shopt -s nullglob
version=$(grep 'define.THISFIRMWARE' *.pde *.h 2> /dev/null | cut -d'"' -f2)
version=$(grep 'define.THISFIRMWARE' version.h 2> /dev/null | cut -d'"' -f2)
echo >> "$destdir/git-version.txt"
echo "APMVERSION: $version" >> "$destdir/git-version.txt"
}

View File

@ -81,7 +81,7 @@ addfwversion() {
git log -1 > "$destdir/git-version.txt"
[ -f APM_Config.h ] && {
shopt -s nullglob
version=$(grep 'define.THISFIRMWARE' *.pde *.h 2> /dev/null | cut -d'"' -f2)
version=$(grep 'define.THISFIRMWARE' version.h 2> /dev/null | cut -d'"' -f2)
echo >> "$destdir/git-version.txt"
echo "APMVERSION: $version" >> "$destdir/git-version.txt"
}