github.com/KevinKlinger/open_terraform@v0.11.12-beta1/scripts/docker-release/tag.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  # This script tags the version number given on the command line as being
     4  # the "latest" on the local system only.
     5  #
     6  # The following tags are updated:
     7  #  - light (from the tag named after the version number)
     8  #  - full (from the tag named after the version number with "-full" appended)
     9  #  - latest (as an alias of light)
    10  #
    11  # Before running this the build.sh script must be run to actually create the
    12  # images that this script will tag.
    13  #
    14  # After tagging, use push.sh to push the images to dockerhub.
    15  
    16  set -eu
    17  
    18  VERSION="$1"
    19  VERSION_SLUG="${VERSION#v}"
    20  
    21  echo "-- Updating tags to point to version $VERSION --"
    22  echo ""
    23  
    24  docker tag "hashicorp/terraform:${VERSION_SLUG}" "hashicorp/terraform:light"
    25  docker tag "hashicorp/terraform:${VERSION_SLUG}" "hashicorp/terraform:latest"
    26  docker tag "hashicorp/terraform:${VERSION_SLUG}-full" "hashicorp/terraform:full"