summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-12-06 16:02:31 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-12-10 19:55:37 -0500
commit436ec9f3b31f9bc7ccf8c685afcda9fc424e45e9 (patch)
tree923f7779dde5a264438a9f4022d047f80faf8dde
parent921d32381a0bdd693935aa2bada3cd76870bf2f9 (diff)
downloadhaskell-436ec9f3b31f9bc7ccf8c685afcda9fc424e45e9.tar.gz
gitlab-ci: Move changelog linting logic to shell script
Allowing it to be easily used locally.
-rw-r--r--.gitlab-ci.yml6
-rwxr-xr-x.gitlab/linters/check-changelogs.sh14
2 files changed, 15 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0bf5b24898..8ccea58540 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -169,11 +169,7 @@ lint-submods-branch:
tags:
- lint
script:
- - |
- grep TBA libraries/*/changelog.md && (
- echo "Error: Found \"TBA\"s in changelogs."
- exit 1
- ) || exit 0
+ - bash .gitlab/linters/check-changelogs.sh
lint-changelogs:
extends: .lint-changelogs
diff --git a/.gitlab/linters/check-changelogs.sh b/.gitlab/linters/check-changelogs.sh
new file mode 100755
index 0000000000..0a0b6328b9
--- /dev/null
+++ b/.gitlab/linters/check-changelogs.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+set -e
+
+COLOR_RED="\e[31m"
+COLOR_GREEN="\e[32m"
+COLOR_NONE="\e[0m"
+
+grep TBA libraries/*/changelog.md && (
+ echo -e "${COLOR_RED}Error: Found \"TBA\"s in changelogs.${COLOR_NONE}"
+ exit 1
+)
+
+echo -e "${COLOR_GREEN}changelogs look okay.${COLOR_NONE}"