git-full-fetch.sh 254 B

12345678910111213
  1. #!/usr/bin/env bash
  2. set -e
  3. # see https://stackoverflow.com/a/44036810/1548052
  4. # fetch the tags
  5. git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
  6. git fetch --tags
  7. # checkout the tagged commit
  8. git checkout -qf ${CI_TAG}