Use $HOSTNAME if is defined

This commit is contained in:
Héctor Molinero Fernández 2018-02-12 19:46:37 +01:00
commit d7fe4ec39f
2 changed files with 3 additions and 6 deletions

View file

@ -8,7 +8,7 @@ build:
stage: build
script:
- apk add --no-cache curl file gawk grep libidn make sed zip
- make build stats index
- HOSTNAME= make build stats index
artifacts:
expire_in: 1 week
paths:

7
hblock
View file

@ -16,11 +16,8 @@ backupDir=''
lenient=false
ignoreDownloadError=false
hostname=$(uname -n)
# Prevent adding 'localhost' twice
hostname=$(printf -- '%s' "$hostname" | sed '/^localhost$/d')
# Prevent adding GitLab CI runner hostname
hostname=$(printf -- '%s' "$hostname" | sed '/^runner-[[:alnum:]]\{8\}-project-.*$/d')
# shellcheck disable=SC2039
hostname=${HOSTNAME-$(uname -n)}
# Default header block
header=$(cat <<-EOF