Commit a1666c36 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

Drop update-image script

This is redundant now since we build these via CI.
parent 6722f585
#!/usr/bin/env bash
set -e
repo=ghcci
if [[ $# != 2 ]]; then
echo "Usage: $0 DIR VERSION"
echo
echo "Update Docker image in DIR, pushing it to the $repo repository as"
echo "version VERSION"
echo
echo "Example: $0 x86_64-linux-fedora 0.0.3"
exit 1
fi
name=$1
version=$2
#versions="$(curl -s https://registry.hub.docker.com/v1/repositories/$repo/$name/tags | jq -r .[].name)"
#if echo "$versions" | grep $version > /dev/null; then
# echo "Version $version of $name already exists"
# echo "Previous versions are:"
# echo "$versions"
# exit 1
#fi
docker build $name -t $repo/$name:$version
docker push $repo/$name:$version
repo_name="$repo/$name"
sed -i -E -e "s%$repo_name"':[0-9]+(\.[0-9]+)*%'"$repo_name:$version%" ../config.yml
sed -i -E -e "s%$repo_name"':[0-9]+(\.[0-9]+)*%'"$repo_name:$version%" ../../.gitlab-ci.yml
echo "Built, pushed, and bumped $name:$version"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment