mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Merge pull request #3270 from holta/remote-recording
Record branch's actual Git remote (URL) to iiab.ini (in 2 places) + cleaner /usr/bin/iiab-summary when Admin Console is missing
This commit is contained in:
commit
8fb2faf59a
4 changed files with 18 additions and 5 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
|
||||||
|
|
|
@ -34,9 +34,13 @@ if [ -f /etc/iiab/pr-list-pulled ]; then
|
||||||
cat /etc/iiab/pr-list-pulled
|
cat /etc/iiab/pr-list-pulled
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
if [ -d /opt/iiab/iiab-admin-console ]; then
|
||||||
echo -e "iiab-admin-console: $SHORT_HASH2, $PR_COUNT2 PR's / $COMMITS2 commits since tag $TAG2"
|
echo -e "iiab-admin-console: $SHORT_HASH2, $PR_COUNT2 PR's / $COMMITS2 commits since tag $TAG2"
|
||||||
echo -e " \e[1m\"$COMMIT_MSG2\"\e[0m"
|
echo -e " \e[1m\"$COMMIT_MSG2\"\e[0m"
|
||||||
echo " $REMOTE_URL2 branch: $BRANCH2"
|
echo " $REMOTE_URL2 branch: $BRANCH2"
|
||||||
|
else
|
||||||
|
echo " WARNING: Directory /opt/iiab/iiab-admin-console does not exist!"
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
if [ -f /etc/rpi-issue ]; then
|
if [ -f /etc/rpi-issue ]; then
|
||||||
cat /etc/rpi-issue
|
cat /etc/rpi-issue
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Higher-level purpose explained at the bottom of:
|
# Higher-level purpose explained at the bottom of:
|
||||||
# https://github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
# https://github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||||
|
|
||||||
# 2020-10-27: Most of the 12 variables require a command[*] to be run to
|
# 2020-10-27: Most of the 13 variables require a command[*] to be run to
|
||||||
# establish the var's value. WE DISPLAY ALL ERRORS / DIAGNOSTICS AND CONTINUE.
|
# 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
|
# [*] DOESN'T MATTER WHAT COMMAND: so long as it fails with Return Code != 0
|
||||||
|
@ -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…
Reference in a new issue