From 0ccc1a6ee26a056e2b96aa24168a7f978c7cf008 Mon Sep 17 00:00:00 2001 From: Kevin Davis Date: Tue, 15 Oct 2019 16:31:07 -0400 Subject: [PATCH] handle circleci tags --- .circleci/config.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index da9f280f..dcb450d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,17 +18,14 @@ commands: name: "Restore source code cache" keys: - go-src-v1-{{ .Revision }} - - checkout - run: name: Checkout with tags command: | - git fetch --force origin "refs/tags/${CIRCLE_TAG}:refs/tags/${CIRCLE_TAG}" - if [ -n "$CIRCLE_BRANCH" ] + if [ -n "$CIRCLE_TAG" ] then - git reset --hard $CIRCLE_SHA1 - git checkout -q -B $CIRCLE_BRANCH + git fetch --force origin "refs/tags/${CIRCLE_TAG}:refs/tags/${CIRCLE_TAG}" fi - git reset --hard $CIRCLE_SHA1 + - checkout - restore_cache: name: "Restore go modules cache" keys: