diff --git a/board/SConscript b/board/SConscript index 4570bf1a5..2fcdfeeba 100644 --- a/board/SConscript +++ b/board/SConscript @@ -129,6 +129,9 @@ def objcopy(source, target, env, for_signature): with open("obj/gitversion.h", "w") as f: f.write(f'const uint8_t gitversion[] = "{get_version(BUILDER, BUILD_TYPE)}";\n') +with open("obj/version", "w") as f: + f.write(f'{get_version(BUILDER, BUILD_TYPE)}') + certs = [get_key_header(n) for n in ["debug", "release"]] with open("obj/cert.h", "w") as f: for cert in certs: diff --git a/release/make_release.sh b/release/make_release.sh index 5aec1a794..833342834 100755 --- a/release/make_release.sh +++ b/release/make_release.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ ! -d "../../pandaextra" ]; then +if [ ! -d "../../xx/pandaextra" ]; then echo "No release cert found, cannot build release." echo "You probably aren't looking to do this anyway." exit @@ -8,34 +8,15 @@ fi export RELEASE=1 export BUILDER=DEV +export CERT=~/xx/pandaextra/certs/release -# make ST + bootstub -pushd . cd ../board -make clean -make obj/panda.bin -make obj/bootstub.panda.bin -popd - -# make ESP -pushd . -cd ../boardesp -make clean -make user1.bin -make user2.bin -popd - -# make release -mkdir obj -make -f ../common/version.mk -make obj/gitversion.h -RELEASE_NAME=$(python -c "import sys;sys.stdout.write(open('obj/gitversion.h').read().split('\"')[1])") -echo -en $RELEASE_NAME > /tmp/version -rm -rf obj - -# make zip file -pushd . -cd .. -zip -j release/panda-$RELEASE_NAME.zip ~/one/panda/board/obj/bootstub.panda.bin ~/one/panda/board/obj/panda.bin ~/one/panda/boardesp/user?.bin ~/one/panda/boardesp/esp-open-sdk/ESP8266_NONOS_SDK_V1.5.4_16_05_20/bin/boot_v1.5.bin /tmp/version -popd - +scons -u -c +rm obj/* +scons -u +cd obj +RELEASE_NAME=$(awk '{print $1}' version) +rm panda.bin panda_h7.bin +mv panda.bin.signed panda.bin +mv panda_h7.bin.signed panda_h7.bin +zip -j ../../release/panda-$RELEASE_NAME.zip version panda.bin bootstub.panda.bin panda_h7.bin bootstub.panda_h7.bin