Добавлен хеш Git-коммита в имя BIN-файла прошивки

This commit is contained in:
2026-09-22 12:56:45 +03:00
parent 052f1fb4f3
commit e8cb02449f
5 changed files with 30 additions and 10 deletions
+16
View File
@@ -0,0 +1,16 @@
@echo off
setlocal
set "SRC_ROOT=%~dp0"
set "GIT_COMMIT="
for /f "delims=" %%H in ('git -C "%SRC_ROOT%." rev-parse --short^=8 HEAD') do set "GIT_COMMIT=%%H"
if not defined GIT_COMMIT (
echo ERROR: Cannot determine the Git commit. Make Git available in PATH. 1>&2
exit /b 1
)
pushd "%SRC_ROOT%Bin" || exit /b 1
hex2000.exe UKSSTMS320F28335.out -boot -sci8 -map UKSSTMS320F28335.map -o UKSSTMS320F28335_%GIT_COMMIT%.bin -b
set "BUILD_RESULT=%errorlevel%"
popd
exit /b %BUILD_RESULT%