mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(docker): fix COMMIT_HASH variable check
The previous method was super bad. Even if a variable was declared, if it was empty, we would run into a false-positive. Additionally, the previous method did not allow us to not specify the COMMIT_HASH variable; which is problematic for development environments. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
9464de108f
commit
0af6a2c32f
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ sed -ri "s;^(aur_location) = .+;\1 = ${AURWEB_FASTAPI_PREFIX};" conf/config
|
|||
sed -ri 's/^(cache) = .+/\1 = redis/' conf/config
|
||||
sed -ri 's|^(redis_address) = .+|\1 = redis://redis|' conf/config
|
||||
|
||||
if [ "$COMMIT_HASH" ]; then
|
||||
if [ ! -z ${COMMIT_HASH+x} ]; then
|
||||
sed -ri "s/^;?(commit_hash) =.*$/\1 = $COMMIT_HASH/" conf/config
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue