Fix git shortlog bug
This commit is contained in:
parent
08fda00993
commit
a33679f95f
|
@ -12,11 +12,9 @@ function show_usage {
|
||||||
|
|
||||||
function main {
|
function main {
|
||||||
|
|
||||||
cd $SRC_DIR
|
cd "$SRC_DIR"
|
||||||
|
|
||||||
git status 2>&1 1>/dev/null
|
if [ ! -d '.git' ]; then
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
|
||||||
fatal "The directory $SRC_DIR seems not to be a valid Git repository."
|
fatal "The directory $SRC_DIR seems not to be a valid Git repository."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -30,7 +28,7 @@ function main {
|
||||||
repo_name=$(basename `git rev-parse --show-toplevel`)
|
repo_name=$(basename `git rev-parse --show-toplevel`)
|
||||||
current_commit=$(git log -n 1 --pretty=format:"%h")
|
current_commit=$(git log -n 1 --pretty=format:"%h")
|
||||||
logs=$(git log --pretty=format:"%an - %h : %s" | sed 's/"/\\"/g')
|
logs=$(git log --pretty=format:"%an - %h : %s" | sed 's/"/\\"/g')
|
||||||
git_maintainer=$(git shortlog -s -n -e 2>&1 | sed 's/^\s*[0-9]*\s*//g' | head -n 1)
|
git_maintainer=$(git shortlog -s -n -e 2>&1 < /dev/tty | sed 's/^\s*[0-9]*\s*//g' | head -n 1)
|
||||||
|
|
||||||
# Get current version from manifest
|
# Get current version from manifest
|
||||||
current_name=$(echo "$MANIFEST" | jq -r ".name" | sed 's/null//')
|
current_name=$(echo "$MANIFEST" | jq -r ".name" | sed 's/null//')
|
||||||
|
@ -62,7 +60,6 @@ function main {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Load util lib
|
# Load util lib
|
||||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
source "$DIR/lib/util.sh"
|
source "$DIR/lib/util.sh"
|
||||||
|
|
Loading…
Reference in New Issue