mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
artifacts: add git SHA1 sanity checking
This commit is contained in:
committed by
Igor Pečovnik
parent
8cd830d6e1
commit
b73ced7dc0
@@ -28,6 +28,9 @@ function artifact_firmware_prepare_version() {
|
||||
run_memoized GIT_INFO_ARMBIAN_FIRMWARE "git2info" memoized_git_ref_to_info
|
||||
debug_dict GIT_INFO_ARMBIAN_FIRMWARE
|
||||
|
||||
# Sanity check, the SHA1 gotta be sane.
|
||||
[[ "${GIT_INFO_ARMBIAN_FIRMWARE[SHA1]}" =~ ^[0-9a-f]{40}$ ]] || exit_with_error "SHA1 is not sane: '${GIT_INFO_ARMBIAN_FIRMWARE[SHA1]}'"
|
||||
|
||||
declare fake_unchanging_base_version="1"
|
||||
|
||||
declare short_sha1="${GIT_INFO_ARMBIAN_FIRMWARE[SHA1]:0:${short_hash_size}}"
|
||||
|
||||
Reference in New Issue
Block a user