Compare commits

..
Author SHA1 Message Date
sneak 51245804d0 tag image
check / check (push) Successful in 4m12s
2026-11-18 18:52:48 -08:00
2 changed files with 14 additions and 6 deletions

No files matched your search

+6 -1
View File
@@ -8,6 +8,8 @@ set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)" ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
set -x
main() { main() {
cd "$ROOT" cd "$ROOT"
# Own line: a failing command substitution inside an argument does # Own line: a failing command substitution inside an argument does
@@ -23,7 +25,10 @@ main() {
--build-arg VERSION="$version" \ --build-arg VERSION="$version" \
--build-arg REVISION="$revision" \ --build-arg REVISION="$revision" \
--build-arg CREATED="$created" \ --build-arg CREATED="$created" \
-t "$("$SCRIPT_DIR/projectname")" . -t "$("$SCRIPT_DIR/projectname")" \
-t "$("$SCRIPT_DIR/projectname"):$version" \
-t "$("$SCRIPT_DIR/projectname"):$(date -u +%Y-%m-%d)" \
.
} }
main "$@" main "$@"
+8 -5
View File
@@ -14,13 +14,16 @@ set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)" ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
PUBLISH_IMAGE="git.eeqj.de/sneak/smallwebwaf"
main() { main() {
if [ -z "${DOCKER_HOST:-}" ]; then
echo "script/publish: DOCKER_HOST is not set; set it to the Docker host that builds the image, such as ssh://user@build.example.com" >&2
exit 1
fi
if [ -z "${PUBLISH_IMAGE:-}" ]; then
echo "script/publish: PUBLISH_IMAGE is not set; set it to the image name in the registry, such as registry.example.com/smallwebwaf" >&2
exit 1
fi
# we don't set DOCKER_HOST here because the caller is expected to have
# either already set it, or used 'docker context' to make 'docker
# <whatever>' "just work".
cd "$ROOT" cd "$ROOT"
# Own line: a failing command substitution inside an argument does # Own line: a failing command substitution inside an argument does