Skip to content

Commit 37936be

Browse files
committed
tools: In build-stm-latest, replace git hash with git tag.
1 parent 04b9147 commit 37936be

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tools/build-stm-latest.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ fi
1717
# get the date
1818
date=$(date '+%Y-%m-%d')
1919

20-
# get the git hash
21-
git_hash="$(git rev-parse --short HEAD 2> /dev/null || echo unknown)"
20+
# get the git tag
21+
git_tag="$(git describe --dirty || echo unknown)"
2222

2323
# build the versions
2424
for board in PYBV3 PYBV10; do
2525
echo $board
2626
lower_board=$(echo $board | tr A-Z a-z)
2727
build_dir=/tmp/stm-build-$board
2828
make -B BOARD=$board BUILD=$build_dir || exit 1
29-
mv $build_dir/firmware.dfu $dest_dir/$lower_board-$date-$git_hash.dfu
29+
mv $build_dir/firmware.dfu $dest_dir/$lower_board-$date-$git_tag.dfu
3030
rm -rf $build_dir
3131
done

0 commit comments

Comments
 (0)