mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-25 17:09:44 +00:00
ci: include version+githash into artefact filenames
This commit is contained in:
parent
fc1f90875b
commit
cc3f7b8d48
19
ci/build.yml
19
ci/build.yml
@ -17,11 +17,13 @@ build core firmware:
|
||||
- pipenv run make build_prodtest
|
||||
- pipenv run make build_firmware
|
||||
- pipenv run make sizecheck
|
||||
- cd ..
|
||||
- export VERSION=$(./tools/version.sh core/embed/firmware/version.h)
|
||||
- cp core/build/firmware/firmware.bin trezor-$VERSION-$CI_COMMIT_SHORT_SHA.bin
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||
paths:
|
||||
- core/build/firmware/firmware.bin
|
||||
- core/build/bootloader/bootloader.bin
|
||||
- trezor-*.*.*-$CI_COMMIT_SHORT_SHA.bin
|
||||
expire_in: 1 week
|
||||
|
||||
build core firmware bitcoinonly:
|
||||
@ -34,10 +36,12 @@ build core firmware bitcoinonly:
|
||||
- mv build/firmware/firmware.bin build/firmware/firmware-bitcoinonly.bin
|
||||
- cd ..
|
||||
- pipenv run ./tools/check-bitcoin-only core/build/firmware/firmware-bitcoinonly.bin
|
||||
- export VERSION=$(./tools/version.sh core/embed/firmware/version.h)
|
||||
- cp core/build/firmware/firmware-bitcoinonly.bin trezor-$VERSION-$CI_COMMIT_SHORT_SHA-bitcoinonly.bin
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||
paths:
|
||||
- core/build/firmware/firmware-bitcoinonly.bin
|
||||
- trezor-*.*.*-$CI_COMMIT_SHORT_SHA-bitcoinonly.bin
|
||||
expire_in: 1 week
|
||||
|
||||
build core unix:
|
||||
@ -115,10 +119,13 @@ build legacy firmware:
|
||||
- pipenv run script/cibuild
|
||||
- pipenv run make -C bootloader
|
||||
- pipenv run make -C demo
|
||||
- cd ..
|
||||
- export VERSION=$(./tools/version.sh legacy/firmware/version.h)
|
||||
- cp legacy/firmware/trezor.bin trezor-$VERSION-$CI_COMMIT_SHORT_SHA.bin
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||
paths:
|
||||
- legacy/firmware/trezor.bin
|
||||
- trezor-*.*.*-$CI_COMMIT_SHORT_SHA.bin
|
||||
expire_in: 1 week
|
||||
|
||||
build legacy firmware debug:
|
||||
@ -141,10 +148,12 @@ build legacy firmware bitcoinonly:
|
||||
- mv firmware/trezor.bin firmware/trezor-bitcoinonly.bin
|
||||
- cd ..
|
||||
- pipenv run ./tools/check-bitcoin-only legacy/firmware/trezor-bitcoinonly.bin
|
||||
- export VERSION=$(./tools/version.sh legacy/firmware/version.h)
|
||||
- cp legacy/firmware/trezor-bitcoinonly.bin trezor-$VERSION-$CI_COMMIT_SHORT_SHA-bitcoinonly.bin
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||
paths:
|
||||
- legacy/firmware/trezor-bitcoinonly.bin
|
||||
- trezor-*.*.*-$CI_COMMIT_SHORT_SHA-bitcoinonly.bin
|
||||
expire_in: 1 week
|
||||
|
||||
build legacy emu:
|
||||
|
@ -20,9 +20,7 @@
|
||||
#ifndef __BOOTLOADER_H__
|
||||
#define __BOOTLOADER_H__
|
||||
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 8
|
||||
#define VERSION_PATCH 1
|
||||
#include "version.h"
|
||||
|
||||
#define STR(X) #X
|
||||
#define VERSTR(X) STR(X)
|
||||
|
3
legacy/bootloader/version.h
Normal file
3
legacy/bootloader/version.h
Normal file
@ -0,0 +1,3 @@
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 8
|
||||
#define VERSION_PATCH 1
|
7
tools/version.sh
Executable file
7
tools/version.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: version.sh path/to/version.h"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "VERSION_MAJOR.VERSION_MINOR.VERSION_PATCH" | cpp -include $1 -nostdinc -P | tr -d " "
|
Loading…
Reference in New Issue
Block a user