From 66b10f025b0dbba48f9fb89a85f104834bf67197 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Tue, 23 Nov 2021 14:00:48 +0100
Subject: [PATCH] [doc/macos] Improve update-ci script [skip ci]

---
 doc/macos-ci-install/update-ci.sh | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/doc/macos-ci-install/update-ci.sh b/doc/macos-ci-install/update-ci.sh
index 2b8982a4..3e97e841 100644
--- a/doc/macos-ci-install/update-ci.sh
+++ b/doc/macos-ci-install/update-ci.sh
@@ -1,45 +1,31 @@
 #!/usr/bin/env bash
 
 # Update CI installation
-echo "[update-ci] Updating homebrew..."
 brew=/usr/local/bin/brew
 pip=/usr/local/bin/pip3
 if [ ! -x ${brew} ]; then
     brew=/opt/homebrew/bin/brew
     pip=/opt/homebrew/bin/pip3
 fi
+echo "[update-ci.sh] Updating homebrew..."
 ${brew} update
 
-# We now check if gitlab-runner is going to be updated
-gitlab_runner_reconfigure=false
-if [[ $(brew outdated | grep -c "gitlab-runner") != 0 ]]; then
-    echo "[update-ci] The package gitlab-runner is going to be updated (will reconfigure)"
-    gitlab_runner_reconfigure=true
-fi
-
-echo "[update-ci] Upgrading homebrew (outdated) packages..."
+echo "[update-ci.sh] Upgrading homebrew (outdated) packages..."
 ${brew} upgrade
 
 # A cask upgrade may require sudo, so we cannot do this
 # with an unattended setup
-#echo "Updating homebrew casks..."
+#echo "[update-ci.sh] Updating homebrew casks..."
 #${brew} cask upgrade
 
-echo "[update-ci] Cleaning-up homebrew..."
+echo "[update-ci.sh] Cleaning-up homebrew..."
 ${brew} cleanup
 
 # Updates PIP packages installed
 function pipupdate() {
-  echo "Updating ${1} packages..."
+  echo "[update-ci.sh] Updating ${1} packages..."
   [ ! -x "${1}" ] && return
   ${1} list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 ${1} install -U;
 }
 
 pipupdate ${pip}
-
-# If gitlab-runner was updated, re-configures it
-if [[ "${gitlab_runner_reconfigure}" == "true" ]]; then
-    echo "[update-ci] Reconfiguring gitlab-runner..."
-    /bin/bash <(curl -s https://gitlab.idiap.ch/bob/bob.devtools/raw/master/doc/macos-ci-install/reconfig-gitlab-runner.sh)
-    echo "[update-ci] The gitlab-runner daemon should be fully operational now."
-fi
-- 
GitLab