mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Please Codefactor.
Signed-off-by: Adam Warner <adamw@rner.email>
This commit is contained in:
parent
62c00ae1d8
commit
c8b9e42649
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user