From b356eecbf3357bad3377627add797eccc1bd260d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Tue, 12 May 2020 23:20:13 +0100 Subject: [PATCH] fix(ci): check if bootstrap and bootswatch versions are the same --- .travis.yml | 6 ++++++ make/lint-versions.mk | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4e97d778e..34b54f95c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -140,6 +140,12 @@ jobs: language: shell script: make lint-nodejs-version + - stage: Lint + name: Lint Bootstrap Version + if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request) + language: shell + script: make lint-bootstrap-version + - stage: Lint name: Generate Changelog if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request) diff --git a/make/lint-versions.mk b/make/lint-versions.mk index 89f720142..873d1f0c1 100644 --- a/make/lint-versions.mk +++ b/make/lint-versions.mk @@ -18,5 +18,14 @@ lint-nodejs-version: exit 1; \ fi +.PHONY: lint-bootstrap-version +lint-bootstrap-version: + $(eval BOOTSTRAP_VERSION := $(shell grep bootstrap ui/package.json | cut -d: -f2 | tr -d ' ",')) + $(eval BOOTSWATCH_VERSION := $(shell grep bootswatch ui/package.json | cut -d: -f2 | tr -d ' ",')) + @if [ "$(BOOTSTRAP_VERSION)" != "$(BOOTSWATCH_VERSION)" ]; then \ + echo "Bootstrap version mismatch: BOOTSTRAP_VERSION=$(BOOTSTRAP_VERSION) BOOTSWATCH_VERSION=$(BOOTSWATCH_VERSION)"; \ + exit 1; \ + fi + .PHONY: lint-versions lint-versions: lint-golang-version lint-nodejs-version