mirror of https://github.com/sipwise/ngcpcfg.git
Change-Id: I56f3c6d6cb5187ac471e0ae05ff313f24803fc1cchanges/14/3014/6
parent
ef891f3560
commit
e8f7ce894e
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
# Purpose: show ngcpcfg log (git log) in human readable format
|
||||
################################################################################
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
# support testsuite
|
||||
FUNCTIONS="${FUNCTIONS:-/usr/share/ngcp-ngcpcfg/functions/}"
|
||||
HELPER="${HELPER:-/usr/share/ngcp-ngcpcfg/helper/}"
|
||||
|
||||
if ! [ -r "${FUNCTIONS}"/main ] ; then
|
||||
printf "Error: %s/main could not be read. Exiting.\n" "${FUNCTIONS}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. "${FUNCTIONS}"/main
|
||||
|
||||
cd "$NGCPCTL_MAIN"
|
||||
|
||||
if [ -f "${FUNCTIONS}/ha_features" ] ; then
|
||||
|
||||
if ! git remote update origin >/dev/null 2>&1 ; then
|
||||
log_error "Failed to fetch changes from shared repository"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git log $* --oneline --date-order --graph --date=rfc --format=format:"%h (%ar) %s %d" master origin/master
|
||||
|
||||
else
|
||||
|
||||
git log $* --oneline --date-order --graph --date=rfc --format=format:"%h (%ar) %s %d" master
|
||||
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
## END OF FILE #################################################################
|
||||
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
# Purpose: show ngcpcfg changes (git show) as part of ngcpcfg framework
|
||||
################################################################################
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
# support testsuite
|
||||
FUNCTIONS="${FUNCTIONS:-/usr/share/ngcp-ngcpcfg/functions/}"
|
||||
HELPER="${HELPER:-/usr/share/ngcp-ngcpcfg/helper/}"
|
||||
|
||||
if ! [ -r "${FUNCTIONS}"/main ] ; then
|
||||
printf "Error: %s/main could not be read. Exiting.\n" "${FUNCTIONS}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. "${FUNCTIONS}"/main
|
||||
|
||||
if [ "$*" = "" ] ; then
|
||||
git_commit="HEAD"
|
||||
else
|
||||
git_commit="$*"
|
||||
fi
|
||||
|
||||
|
||||
cd "$NGCPCTL_MAIN"
|
||||
git show ${git_commit}
|
||||
|
||||
exit 0
|
||||
|
||||
## END OF FILE #################################################################
|
||||
Loading…
Reference in new issue