From b9feb18d7004444e2c1e5cdc26da417cffc18998 Mon Sep 17 00:00:00 2001
From: Pierre Smeyers <pierre.smeyers@gmail.com>
Date: Sun, 1 May 2022 13:19:00 +0200
Subject: [PATCH] chore: remove check_for_update script

---
 templates/gitlab-ci-maven.yml | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/templates/gitlab-ci-maven.yml b/templates/gitlab-ci-maven.yml
index e8455ec..1ead8bb 100644
--- a/templates/gitlab-ci-maven.yml
+++ b/templates/gitlab-ci-maven.yml
@@ -404,24 +404,6 @@ stages:
     fi
   }
 
-  function get_latest_template_version() {
-    tag_json=$(curl -s --connect-timeout 5 "$CI_API_V4_URL/projects/to-be-continuous%2F$1/repository/tags?per_page=1" 2> /dev/null || echo "")
-    echo "$tag_json" | sed -rn 's/^.*"name":"([^"]*)".*$/\1/p'
-  }
-
-  function check_for_update() {
-    template="$1"
-    actual="$2"
-    latest=$(get_latest_template_version "$template")
-    if [[ -n "$latest" ]] && [[ "$latest" != "$actual" ]]
-    then
-      log_warn "\\e[1;93m=======================================================================================================\\e[0m"
-      log_warn "\\e[93mThe template \\e[32m$template\\e[93m:\\e[33m$actual\\e[93m you're using is not up-to-date: consider upgrading to version \\e[32m$latest\\e[0m"
-      log_warn "\\e[93m(set \$TEMPLATE_CHECK_UPDATE_DISABLED to disable this message)\\e[0m"
-      log_warn "\\e[1;93m=======================================================================================================\\e[0m"
-    fi
-  }
-
   function perform_snapshot() {
     # shellcheck disable=SC2086
     pom_version=$(mvn $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout | tail -n 1)
@@ -437,7 +419,6 @@ stages:
     esac
   }
 
-  if [[ "$TEMPLATE_CHECK_UPDATE_DISABLED" != "true" ]]; then check_for_update maven "2.2.0"; fi
   unscope_variables
 
   # ENDSCRIPT
-- 
GitLab