1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Record branch's actual Git remote (URL) to iiab.ini (in 2 places)

This commit is contained in:
root 2022-06-29 12:50:11 -04:00
parent 6e8d0499b6
commit 64b2635bbb
3 changed files with 10 additions and 1 deletions

View file

@ -29,6 +29,8 @@
value: "{{ ansible_architecture }}"
- option: iiab_base_ver
value: "{{ iiab_base_ver }}"
- option: iiab_remote
value: "{{ ansible_local.local_facts.iiab_remote }}"
- option: iiab_branch
value: "{{ ansible_local.local_facts.iiab_branch }}"
- option: iiab_commit

View file

@ -73,6 +73,8 @@
value: "{{ iiab_base_ver }}"
- option: iiab_revision
value: "{{ iiab_revision }}"
- option: iiab_remote
value: "{{ ansible_local.local_facts.iiab_remote }}"
- option: runtime_branch
value: "{{ ansible_local.local_facts.iiab_branch }}"
- option: runtime_commit

View file

@ -12,6 +12,7 @@
STAGE=0
OS="none"
VERSION_ID="none" # This var's combined with the above, before being output
IIAB_REMOTE="none"
IIAB_BRANCH="none"
IIAB_COMMIT="none"
IIAB_RECENT_TAG="none"
@ -86,10 +87,13 @@ case $OS_VER in
;;
esac
# These next 3 help indicate what version of IIAB
# These next 4 help indicate what version of IIAB
tmp=$(git rev-parse --abbrev-ref HEAD) &&
IIAB_BRANCH=$tmp
tmp=$(git config remote.$(git config branch.$IIAB_BRANCH.remote).url) &&
IIAB_REMOTE=$tmp
tmp=$(git rev-parse --verify HEAD) &&
IIAB_COMMIT=$tmp
@ -141,6 +145,7 @@ cat <<EOF
"dhcpcd" : "$DHCPCD",
"network_manager" : "$NETWORK_MANAGER",
"systemd_networkd" : "$SYSTEMD_NETWORKD",
"iiab_remote" : "$IIAB_REMOTE",
"iiab_branch" : "$IIAB_BRANCH",
"iiab_commit" : "$IIAB_COMMIT",
"iiab_recent_tag" : "$IIAB_RECENT_TAG",