mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[mod] get rid of ./utils/brand.env and its workflow
All the environments defined in ./utils/brand.env are generated on the fly, so there is no longer a need to define the brand environment in this file and all the workflows to handle this file. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
60bc5baea3
commit
f9c5727ddc
16 changed files with 53 additions and 201 deletions
32
utils/brand.sh
Executable file
32
utils/brand.sh
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
# shellcheck source=utils/lib.sh
|
||||
. /dev/null
|
||||
|
||||
build.env.export() {
|
||||
GIT_BRANCH="$(git branch | grep '\*' | cut -d' ' -f2-)"
|
||||
GIT_REMOTE="$(git config "branch.${GIT_BRANCH}.remote")"
|
||||
GIT_URL="$(git config --get "remote.${GIT_REMOTE}.url")"
|
||||
if [[ "${GIT_URL}" == git@* ]]; then
|
||||
GIT_URL="${GIT_URL/://}"
|
||||
GIT_URL="${GIT_URL/git@/https://}"
|
||||
fi
|
||||
if [[ "${GIT_URL}" == *.git ]]; then
|
||||
GIT_URL="${GIT_URL%.git}"
|
||||
fi
|
||||
|
||||
SEARXNG_URL="$(python "${REPO_ROOT}/utils/get_setting.py" server.base_url)"
|
||||
SEARXNG_PORT="$(python "${REPO_ROOT}/utils/get_setting.py" server.port)"
|
||||
SEARXNG_BIND_ADDRESS="$(python "${REPO_ROOT}/utils/get_setting.py" server.bind_address)"
|
||||
export GIT_URL
|
||||
export GIT_BRANCH
|
||||
export SEARXNG_URL
|
||||
export SEARXNG_PORT
|
||||
export SEARXNG_BIND_ADDRESS
|
||||
|
||||
}
|
||||
|
||||
pushd "${REPO_ROOT}" &> /dev/null
|
||||
build.env.export
|
||||
popd &> /dev/null
|
||||
Loading…
Add table
Add a link
Reference in a new issue