diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-06-25 18:34:40 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-06-26 13:13:31 +0200 |
commit | 03d5d14d98b06ce4d4a35f715b17eaccc4da7f86 (patch) | |
tree | ce96f20bfa0d9904cfd617039438d50fa153c407 /utils | |
parent | 80710c666f48c78f65588c967b69ce008d7b799a (diff) | |
download | searxng-03d5d14d98b06ce4d4a35f715b17eaccc4da7f86.tar.gz searxng-03d5d14d98b06ce4d4a35f715b17eaccc4da7f86.zip |
[mod] utils/manage_static.sh: remove git_log_current_branch
Marginal simplification of the procedure to get only the last local commit which
is not in remotes.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/manage_static.sh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/utils/manage_static.sh b/utils/manage_static.sh index 8f58b5dbf..dc0fe2fed 100755 --- a/utils/manage_static.sh +++ b/utils/manage_static.sh @@ -13,13 +13,6 @@ BUILT_PATHS=( searx/static/themes/simple/src/generated/pygments.less ) -git_log_current_branch() { - local branch - branch="$(git branch --show-current)" - git log "${branch}" --pretty=format:'%h' \ - --not --exclude="${branch}" --branches --remotes -} - is.build.commit() { local commit_sha="$1" local commit_message @@ -46,9 +39,15 @@ is.build.commit() { return 0 } + static.build.commit.drop() { local last_commit_id - last_commit_id=$(git_log_current_branch | head -1) + local branch + + # get only last (option -n1) local commit not in remotes + branch="$(git branch --show-current)" + last_commit_id="$(git log -n1 "${branch}" --pretty=format:'%h'\ + --not --exclude="${branch}" --branches --remotes)" if [ -z "${last_commit_id}" ]; then echo "Empty branch" |