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:
parent
6e8d0499b6
commit
64b2635bbb
3 changed files with 10 additions and 1 deletions
|
@ -29,6 +29,8 @@
|
||||||
value: "{{ ansible_architecture }}"
|
value: "{{ ansible_architecture }}"
|
||||||
- option: iiab_base_ver
|
- option: iiab_base_ver
|
||||||
value: "{{ iiab_base_ver }}"
|
value: "{{ iiab_base_ver }}"
|
||||||
|
- option: iiab_remote
|
||||||
|
value: "{{ ansible_local.local_facts.iiab_remote }}"
|
||||||
- option: iiab_branch
|
- option: iiab_branch
|
||||||
value: "{{ ansible_local.local_facts.iiab_branch }}"
|
value: "{{ ansible_local.local_facts.iiab_branch }}"
|
||||||
- option: iiab_commit
|
- option: iiab_commit
|
||||||
|
|
|
@ -73,6 +73,8 @@
|
||||||
value: "{{ iiab_base_ver }}"
|
value: "{{ iiab_base_ver }}"
|
||||||
- option: iiab_revision
|
- option: iiab_revision
|
||||||
value: "{{ iiab_revision }}"
|
value: "{{ iiab_revision }}"
|
||||||
|
- option: iiab_remote
|
||||||
|
value: "{{ ansible_local.local_facts.iiab_remote }}"
|
||||||
- option: runtime_branch
|
- option: runtime_branch
|
||||||
value: "{{ ansible_local.local_facts.iiab_branch }}"
|
value: "{{ ansible_local.local_facts.iiab_branch }}"
|
||||||
- option: runtime_commit
|
- option: runtime_commit
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
STAGE=0
|
STAGE=0
|
||||||
OS="none"
|
OS="none"
|
||||||
VERSION_ID="none" # This var's combined with the above, before being output
|
VERSION_ID="none" # This var's combined with the above, before being output
|
||||||
|
IIAB_REMOTE="none"
|
||||||
IIAB_BRANCH="none"
|
IIAB_BRANCH="none"
|
||||||
IIAB_COMMIT="none"
|
IIAB_COMMIT="none"
|
||||||
IIAB_RECENT_TAG="none"
|
IIAB_RECENT_TAG="none"
|
||||||
|
@ -86,10 +87,13 @@ case $OS_VER in
|
||||||
;;
|
;;
|
||||||
esac
|
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) &&
|
tmp=$(git rev-parse --abbrev-ref HEAD) &&
|
||||||
IIAB_BRANCH=$tmp
|
IIAB_BRANCH=$tmp
|
||||||
|
|
||||||
|
tmp=$(git config remote.$(git config branch.$IIAB_BRANCH.remote).url) &&
|
||||||
|
IIAB_REMOTE=$tmp
|
||||||
|
|
||||||
tmp=$(git rev-parse --verify HEAD) &&
|
tmp=$(git rev-parse --verify HEAD) &&
|
||||||
IIAB_COMMIT=$tmp
|
IIAB_COMMIT=$tmp
|
||||||
|
|
||||||
|
@ -141,6 +145,7 @@ cat <<EOF
|
||||||
"dhcpcd" : "$DHCPCD",
|
"dhcpcd" : "$DHCPCD",
|
||||||
"network_manager" : "$NETWORK_MANAGER",
|
"network_manager" : "$NETWORK_MANAGER",
|
||||||
"systemd_networkd" : "$SYSTEMD_NETWORKD",
|
"systemd_networkd" : "$SYSTEMD_NETWORKD",
|
||||||
|
"iiab_remote" : "$IIAB_REMOTE",
|
||||||
"iiab_branch" : "$IIAB_BRANCH",
|
"iiab_branch" : "$IIAB_BRANCH",
|
||||||
"iiab_commit" : "$IIAB_COMMIT",
|
"iiab_commit" : "$IIAB_COMMIT",
|
||||||
"iiab_recent_tag" : "$IIAB_RECENT_TAG",
|
"iiab_recent_tag" : "$IIAB_RECENT_TAG",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue