Compare commits
No commits in common. "master" and "v1.2" have entirely different histories.
1 changed files with 3 additions and 10 deletions
|
@ -3,12 +3,12 @@ script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
repo="$(basename "${script_dir}")"
|
repo="$(basename "${script_dir}")"
|
||||||
tag="${1}"
|
tag="${1}"
|
||||||
if [ -z "${tag}" ]; then
|
if [ -z "${tag}" ]; then
|
||||||
git_tag=$(git describe --exact-match --tags)
|
git_reference=$(git describe --exact-match --tags)
|
||||||
if [ "${git_tag}" == 'master' ] || [ "${git_tag}" == 'main' ] || [ -z "${git_tag}" ]; then
|
if [ "${git_reference}" == 'master' ] || [ "${git_reference}" == 'main' ] || [ -z "${git_reference}" ]; then
|
||||||
echo "Change to a different git reference not 'master/main', since it will be used as tag for the container. Or pass a tag name as only parameter."
|
echo "Change to a different git reference not 'master/main', since it will be used as tag for the container. Or pass a tag name as only parameter."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
tag="${git_tag}"
|
tag="${git_reference}"
|
||||||
fi
|
fi
|
||||||
echo "Building '${repo}:${tag}'..."
|
echo "Building '${repo}:${tag}'..."
|
||||||
podman build --tag "${repo}:${tag}" .
|
podman build --tag "${repo}:${tag}" .
|
||||||
|
@ -16,10 +16,3 @@ echo "Tagging it to 'repos.susurrando.com/adelgado/${repo}:${tag}'..."
|
||||||
podman tag "${repo}:${tag}" "repos.susurrando.com/adelgado/${repo}:${tag}"
|
podman tag "${repo}:${tag}" "repos.susurrando.com/adelgado/${repo}:${tag}"
|
||||||
echo "Pushing it to 'repos.susurrando.com/adelgado/${repo}:${tag}'..."
|
echo "Pushing it to 'repos.susurrando.com/adelgado/${repo}:${tag}'..."
|
||||||
podman push "repos.susurrando.com/adelgado/${repo}:${tag}"
|
podman push "repos.susurrando.com/adelgado/${repo}:${tag}"
|
||||||
tag=latest
|
|
||||||
echo "Building '${repo}:${tag}'..."
|
|
||||||
podman build --tag "${repo}:${tag}" .
|
|
||||||
echo "Tagging it to 'repos.susurrando.com/adelgado/${repo}:${tag}'..."
|
|
||||||
podman tag "${repo}:${tag}" "repos.susurrando.com/adelgado/${repo}:${tag}"
|
|
||||||
echo "Pushing it to 'repos.susurrando.com/adelgado/${repo}:${tag}'..."
|
|
||||||
podman push "repos.susurrando.com/adelgado/${repo}:${tag}"
|
|
||||||
|
|
Loading…
Reference in a new issue