From b1c1ad16d9c19dcdd9353d5a194ab21c62d5a7eb Mon Sep 17 00:00:00 2001 From: "Gudmundur D. Haraldsson" Date: Mon, 20 Jun 2022 14:55:29 +0000 Subject: [PATCH 1/4] Update README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index aa669fbb3..832c62ad8 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,24 @@ If you have a feature request, please read the [file on contributing](CONTRIBUTI `vip-go-ci` comes with a small utility, `tools-init.sh`, that will install PHPCS and related tools in your home-directory upon execution. This utility will check if the tools required are installed, and if not, install them, or if they are, check if they are of the latest version, and upgrade them as needed. It is highly recommended to run this utility on a regular basis. +For example: + +``` +# +# If ~/vip-go-ci-tools does not exist, install it by +# fetching and running tools-init.sh. If it does exist, +# run tools-init.sh to check for updates. +# + +if [ -d ~/vip-go-ci-tools ] ; then + bash ~/vip-go-ci-tools/vip-go-ci/tools-init.sh +else + wget https://raw.githubusercontent.com/Automattic/vip-go-ci/trunk/tools-init.sh -O tools-init.sh && \ + bash tools-init.sh && \ + rm -f tools-init.sh +fi +``` + ### Running on the console, standalone `vip-go-ci` can be run standalone on the console. This is mainly useful for debugging purposes and to understand if everything is correctly configured, but for production purposes it should ideally be run via some kind of build management software (for instance TeamCity or GitHub Actions). To run `vip-go-ci` on the console, a few tools are required. The `tools-init.sh` script that is included will install the tools needed. From 4417fc586d193b1da3c2fed3e5bb6b42035799a4 Mon Sep 17 00:00:00 2001 From: "Gudmundur D. Haraldsson" Date: Mon, 20 Jun 2022 15:34:51 +0000 Subject: [PATCH 2/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 832c62ad8..38280e372 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ For example: if [ -d ~/vip-go-ci-tools ] ; then bash ~/vip-go-ci-tools/vip-go-ci/tools-init.sh else - wget https://raw.githubusercontent.com/Automattic/vip-go-ci/trunk/tools-init.sh -O tools-init.sh && \ + wget https://raw.githubusercontent.com/Automattic/vip-go-ci/latest/tools-init.sh -O tools-init.sh && \ bash tools-init.sh && \ rm -f tools-init.sh fi From 7eda41272f89ab553b87e4b9be1b1a7d4dec4fd9 Mon Sep 17 00:00:00 2001 From: "Gudmundur D. Haraldsson" Date: Mon, 20 Jun 2022 15:36:02 +0000 Subject: [PATCH 3/4] Update tools-init.sh --- tools-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools-init.sh b/tools-init.sh index 034af7418..0875258ba 100755 --- a/tools-init.sh +++ b/tools-init.sh @@ -111,7 +111,7 @@ if [ "$VIP_GO_CI_VER" == "" ] ; then TMP_FILE=`mktemp /tmp/vip-go-ci-latest-release-XXXXX.php` echo "$0: Trying to determine latest release of vip-go-ci, need to fetch latest-release.php first..." - wget -O "$TMP_FILE" https://raw.githubusercontent.com/Automattic/vip-go-ci/trunk/latest-release.php && \ + wget -O "$TMP_FILE" https://raw.githubusercontent.com/Automattic/vip-go-ci/latest/latest-release.php && \ chmod u+x "$TMP_FILE" && \ export VIP_GO_CI_VER=`php $TMP_FILE` && \ rm "$TMP_FILE" && \ From fb499da9dc7b6cb3ee38c2c17bf412caaca9dbba Mon Sep 17 00:00:00 2001 From: "Gudmundur D. Haraldsson" Date: Tue, 21 Jun 2022 14:04:09 +0000 Subject: [PATCH 4/4] Update tools-init.sh --- tools-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools-init.sh b/tools-init.sh index 0875258ba..e680a2c41 100755 --- a/tools-init.sh +++ b/tools-init.sh @@ -90,7 +90,7 @@ if [ -d ~/vip-go-ci-tools ] ; then export TMP_RAND=`seq 1 3 | sort -R | head -n 1` if [ "$TMP_RAND" -ne "1" ] ; then - echo "$0: Not due to update anything, exiting" + echo "$0: Will not check for updates at this time, exiting" lock_remove exit 1 fi