Skip to content

Commit

Permalink
bump_version.sh does not build Docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanguedj committed Feb 22, 2024
1 parent 425e0e4 commit 3865eac
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions bump_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

latest_tag=$(git describe --tags --abbrev=0)
tag_parts=($(echo "$latest_tag" | tr '.' ' '))
docker_registry="registry.gitlab.com/etalab/data.gouv.fr/infra"
docker_image="simple-scaffold"

function git_tag() {
version="$1"
Expand All @@ -13,33 +11,24 @@ function git_tag() {
echo "version '$version' created successfully"
}

function docker_image() {
version="$1"
docker build -t "$docker_registry/$docker_image:$version" .
}

case $1 in
"patch")
new_patch=$((tag_parts[2]+1))
new_version="${tag_parts[0]}.${tag_parts[1]}.$new_patch"
git_tag $new_version
docker_image $new_version
;;
"minor")
new_minor=$((tag_parts[1]+1))
new_version="${tag_parts[0]}.$new_minor.0"
git_tag $new_version
docker_image $new_version
;;
"major")
new_major=$((tag_parts[0]+1))
new_version="$new_major.0.0"
git_tag $new_version
docker_image $new_version
;;
*)
echo "Usage: $0 [patch|minor|major]"
exit 1
;;
esac

0 comments on commit 3865eac

Please sign in to comment.