e38cc58bbc
the branch refers the branch name that the commit is in, for example master, 202012, 201911, ... In case there is no branch, the name will be HEAD. release is encoded in /etc/sonic/sonic_release file. the file is only available for a release branch. It is not available in master branch. Signed-off-by: Guohan Lu <lguohan@gmail.com>
10 lines
269 B
Bash
Executable File
10 lines
269 B
Bash
Executable File
tee $1 > /dev/null <<EOF
|
|
build_version: '$sonic_version'
|
|
asic_type: $sonic_asic_platform
|
|
commit_id: '$(git rev-parse --short HEAD)'
|
|
branch: '$(git rev-parse --abbrev-ref HEAD)'
|
|
build_date: $(date -u)
|
|
build_number: ${BUILD_NUMBER:-0}
|
|
built_by: $USER@$BUILD_HOSTNAME
|
|
EOF
|