Browse Source
Make sure that Docker image matches the checked out Git branch/tag.
Changelog: None
Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
change-dependabot-prefix
Kristian Amlie
3 years ago
No known key found for this signature in database
GPG Key ID: F464407C996AF03F
2 changed files with
16 additions and
2 deletions
-
docker-build
-
docker-mender-convert
|
|
@ -16,6 +16,13 @@ |
|
|
|
|
|
|
|
set -e |
|
|
|
|
|
|
|
IMAGE_NAME=${IMAGE_NAME:-"mendersoftware/mender-convert"} |
|
|
|
GIT_PROVIDED_TAG_NAME="$(git describe --exact HEAD 2>/dev/null || \ |
|
|
|
git for-each-ref "refs/heads/*" --format '%(refname:short)' --points-at HEAD 2>/dev/null)" |
|
|
|
|
|
|
|
if [ -z "$IMAGE_NAME" -a -z "$GIT_PROVIDED_TAG_NAME" ]; then |
|
|
|
echo "Could not deduce mendersoftware/mender-convert container version from currently checked out commit. Using latest." 1>&2 |
|
|
|
fi |
|
|
|
|
|
|
|
IMAGE_NAME=${IMAGE_NAME:-"mendersoftware/mender-convert${GIT_PROVIDED_TAG_NAME:+:$GIT_PROVIDED_TAG_NAME}"} |
|
|
|
|
|
|
|
eval docker build . -t "${IMAGE_NAME}" "$*" |
|
|
|
|
|
@ -16,7 +16,14 @@ |
|
|
|
|
|
|
|
set -e |
|
|
|
|
|
|
|
IMAGE_NAME=${IMAGE_NAME:-"mendersoftware/mender-convert"} |
|
|
|
GIT_PROVIDED_TAG_NAME="$(git describe --exact HEAD 2>/dev/null || \ |
|
|
|
git for-each-ref "refs/heads/*" --format '%(refname:short)' --points-at HEAD 2>/dev/null)" |
|
|
|
|
|
|
|
if [ -z "$IMAGE_NAME" -a -z "$GIT_PROVIDED_TAG_NAME" ]; then |
|
|
|
echo "Could not deduce mendersoftware/mender-convert container version from currently checked out commit. Using latest." 1>&2 |
|
|
|
fi |
|
|
|
|
|
|
|
IMAGE_NAME=${IMAGE_NAME:-"mendersoftware/mender-convert${GIT_PROVIDED_TAG_NAME:+:$GIT_PROVIDED_TAG_NAME}"} |
|
|
|
DEPLOY_DIRECTORY=${DEPLOY_DIRECTORY:-"$(pwd)/deploy"} |
|
|
|
INPUT_DIRECTORY=${INPUT_DIRECTORY:-"$(pwd)/input"} |
|
|
|
LOGS_DIRECTORY=${LOGS_DIRECTORY:-"$(pwd)/logs"} |
|
|
|