scripts/container.sh: allow for empty Branch Names and git errors
resolves #2362 Co-authored-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
6633ff1bf8
commit
191efa90f6
@ -6,8 +6,8 @@ set -euo pipefail
|
|||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
# normalize branch name to reflect a valid image name
|
# normalize branch name to reflect a valid image name
|
||||||
BRANCH=$(git branch --show-current | sed 's/[^a-z0-9-]/_/ig')
|
BRANCH=$(git branch --show-current 2>/dev/null | sed 's/[^a-z0-9-]/_/ig')
|
||||||
TAG=gluon:${BRANCH}
|
TAG="gluon:${BRANCH:-latest}"
|
||||||
|
|
||||||
if [ "$(command -v podman)" ]
|
if [ "$(command -v podman)" ]
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user