Please Codefactor.

Signed-off-by: Adam Warner <adamw@rner.email>
This commit is contained in:
Adam Warner 2019-11-08 19:18:35 +00:00
parent 62c00ae1d8
commit c8b9e42649
No known key found for this signature in database
GPG key ID: 872950F3ECF2B173

View file

@ -422,7 +422,7 @@ make_repo() {
pushd "${directory}" &> /dev/null || return 1 pushd "${directory}" &> /dev/null || return 1
# Check current branch. If it is master, then reset to the latest availible tag. # Check current branch. If it is master, then reset to the latest availible tag.
# In case extra commits have been added after tagging/release (i.e in case of metadata updates/README.MD tweaks) # In case extra commits have been added after tagging/release (i.e in case of metadata updates/README.MD tweaks)
curBranch = $(git rev-parse --abbrev-ref HEAD) curBranch=$(git rev-parse --abbrev-ref HEAD)
if [[ "${curBranch}" == "master" ]]; then #If we're calling make_repo() then it should always be master, we may not need to check. if [[ "${curBranch}" == "master" ]]; then #If we're calling make_repo() then it should always be master, we may not need to check.
git reset --hard $(git describe --abbrev=0) || return $? git reset --hard $(git describe --abbrev=0) || return $?
fi fi
@ -458,7 +458,7 @@ update_repo() {
git pull --quiet &> /dev/null || return $? git pull --quiet &> /dev/null || return $?
# Check current branch. If it is master, then reset to the latest availible tag. # Check current branch. If it is master, then reset to the latest availible tag.
# In case extra commits have been added after tagging/release (i.e in case of metadata updates/README.MD tweaks) # In case extra commits have been added after tagging/release (i.e in case of metadata updates/README.MD tweaks)
curBranch = $(git rev-parse --abbrev-ref HEAD) curBranch=$(git rev-parse --abbrev-ref HEAD)
if [[ "${curBranch}" == "master" ]]; then if [[ "${curBranch}" == "master" ]]; then
git reset --hard $(git describe --abbrev=0) || return $? git reset --hard $(git describe --abbrev=0) || return $?
fi fi