Skip to content
Snippets Groups Projects
Commit d227d255 authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

autotest: added APMVERSION to firmware.diydrones.com version

parent 67de5e51
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,16 @@ skip_build() {
return 1
}
addfwversion() {
destdir="$1"
git log -1 > "$destdir/git-version.txt"
[ -f APM_Config.h ] && {
version=$(grep 'define.THISFIRMWARE' *.pde 2> /dev/null | cut -d'"' -f2)
echo >> "$destdir/git-version.txt"
echo "APMVERSION: $version" >> "$destdir/git-version.txt"
}
}
# copy the built firmware to the right directory
copyit() {
file="$1"
......@@ -63,11 +73,12 @@ copyit() {
if [ "$tag" = "latest" ]; then
mkdir -p "$dir"
/bin/cp "$file" "$dir"
git log -1 > "$dir/git-version.txt"
addfwversion "$dir"
fi
echo "Copying $file to $tdir"
mkdir -p "$tdir"
git log -1 > "$tdir/git-version.txt"
addfwversion "$tdir"
rsync "$file" "$tdir"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment