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