mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Record recent git tag, for 2 primary repos
This commit is contained in:
parent
18aef95d92
commit
f898553346
4 changed files with 19 additions and 20 deletions
|
@ -3,7 +3,7 @@
|
|||
# Higher-level purpose explained at the bottom of:
|
||||
# https://github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||
|
||||
# 2020-10-27: Most of the 11 variables require a command[*] to be run to
|
||||
# 2020-10-27: Most of the 12 variables require a command[*] to be run to
|
||||
# establish the var's value. WE DISPLAY ALL ERRORS / DIAGNOSTICS AND CONTINUE.
|
||||
#
|
||||
# [*] DOESN'T MATTER WHAT COMMAND: so long as it fails with Return Code != 0
|
||||
|
@ -14,7 +14,7 @@ OS="none"
|
|||
VERSION_ID="none" # This var's combined with the above, before being output
|
||||
IIAB_BRANCH="none"
|
||||
IIAB_COMMIT="none"
|
||||
#XO_MODEL="none"
|
||||
IIAB_RECENT_TAG="none"
|
||||
RPI_MODEL="none"
|
||||
DEVICETREE_MODEL="none"
|
||||
ANSIBLE_VERSION="none"
|
||||
|
@ -86,15 +86,15 @@ case $OS_VER in
|
|||
;;
|
||||
esac
|
||||
|
||||
# These next 2 help indicate what version of IIAB
|
||||
# These next 3 help indicate what version of IIAB
|
||||
tmp=$(git rev-parse --abbrev-ref HEAD) &&
|
||||
IIAB_BRANCH=$tmp
|
||||
|
||||
tmp=$(git rev-parse --verify HEAD) &&
|
||||
IIAB_COMMIT=$tmp
|
||||
|
||||
#tmp=$(cat /proc/device-tree/mfg-data/MN) &&
|
||||
# XO_MODEL=$tmp
|
||||
tmp=$(git describe --tags --abbrev=0) &&
|
||||
IIAB_RECENT_TAG=$tmp
|
||||
|
||||
grep -iq raspberry /proc/device-tree/model &&
|
||||
RPI_MODEL=$(grep -ai raspberry /proc/device-tree/model | tr -d '\0')
|
||||
|
@ -143,11 +143,10 @@ cat <<EOF
|
|||
"systemd_networkd" : "$SYSTEMD_NETWORKD",
|
||||
"iiab_branch" : "$IIAB_BRANCH",
|
||||
"iiab_commit" : "$IIAB_COMMIT",
|
||||
"iiab_recent_tag" : "$IIAB_RECENT_TAG",
|
||||
"rpi_model" : "$RPI_MODEL",
|
||||
"devicetree_model" : "$DEVICETREE_MODEL",
|
||||
"ansible_version" : "$ANSIBLE_VERSION",
|
||||
"os" : "$OS",
|
||||
"os_ver" : "$OS_VER"}
|
||||
EOF
|
||||
|
||||
#"xo_model" : "$XO_MODEL",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue