From 92e30010bdea18df94cc9aaa6651ba4f46a8586c Mon Sep 17 00:00:00 2001 From: Jacky Wu Date: Wed, 12 Feb 2020 03:28:07 +0800 Subject: [PATCH] cleanup: remove hugo-version-check.sh. (#18817) --- Makefile | 9 +++------ scripts/README.md | 7 ------- scripts/hugo-version-check.sh | 18 ------------------ 3 files changed, 3 insertions(+), 31 deletions(-) delete mode 100755 scripts/hugo-version-check.sh diff --git a/Makefile b/Makefile index c9dbeeda397dd..56359bd32b77d 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ build: ## Build site with production settings and put deliverables in ./public build-preview: ## Build site with drafts and future posts enabled hugo --buildDrafts --buildFuture -deploy-preview: check-hugo-versions ## Deploy preview site via netlify +deploy-preview: ## Deploy preview site via netlify hugo --enableGitInfo --buildFuture -b $(DEPLOY_PRIME_URL) functions-build: @@ -27,9 +27,9 @@ functions-build: check-headers-file: scripts/check-headers-file.sh -production-build: check-hugo-versions build check-headers-file ## Build the production site and ensure that noindex headers aren't added +production-build: build check-headers-file ## Build the production site and ensure that noindex headers aren't added -non-production-build: check-hugo-versions ## Build the non-production site, which adds noindex headers to prevent indexing +non-production-build: ## Build the non-production site, which adds noindex headers to prevent indexing hugo --enableGitInfo serve: ## Boot the development server. @@ -47,6 +47,3 @@ docker-serve: test-examples: scripts/test_examples.sh install scripts/test_examples.sh run - -check-hugo-versions: - scripts/hugo-version-check.sh $(HUGO_VERSION) diff --git a/scripts/README.md b/scripts/README.md index b0e80a8e4b158..e90d65861db62 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -6,7 +6,6 @@ | `upstream_changes.py` | Find what changes occurred between two versions. | | `test_examples.sh` | This script tests whether a change affects example files bundled in the website. | | `check-headers-file.sh` | This script checks the headers if you are in a production environment. | -| `hugo-version-check.sh` | This script checks whether your local Hugo version matches the version used in production. | | `diff_l10n_branches.py` | This script generates a report of outdated contents in `content/` directory by comparing two l10n team milestone branches. | @@ -71,12 +70,6 @@ This script checks the headers if you are in a production environment. ./scripts/check-headers-file.sh -## hugo-version-check.sh - -This script checks whether your local Hugo version matches the version used in production. - - ./scripts/hugo-version-check.sh - ## diff_l10n_branches.py ``` diff --git a/scripts/hugo-version-check.sh b/scripts/hugo-version-check.sh deleted file mode 100755 index 3186b8f364b98..0000000000000 --- a/scripts/hugo-version-check.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -MAIN_HUGO_VERSION=$1 -NETLIFY_HUGO_VERSION=$(cat netlify.toml | grep HUGO_VERSION | awk '{ print $3 }' | tr -d '"') - -echo ${NETLIFY_HUGO_VERSION} - -if [[ ${MAIN_HUGO_VERSION} != ${NETLIFY_HUGO_VERSION} ]]; then - echo """ - [FAILURE] The Hugo version set in the Makefile is ${MAIN_HUGO_VERSION} while the version in netlify.toml is ${NETLIFY_HUGO_VERSION} - [FAILURE] Please update these versions so that they are same (consider the higher of the two versions as canonical). - """ - exit 1 -else - echo "[SUCCESS] The Hugo versions match between the Makefile and netlify.toml" - exit 0 -fi -