fix(ci): check if bootstrap and bootswatch versions are the same

This commit is contained in:
Łukasz Mierzwa
2020-05-12 23:42:11 +01:00
committed by Łukasz Mierzwa
parent 943382d4b5
commit b356eecbf3
2 changed files with 15 additions and 0 deletions
+6
View File
@@ -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)
+9
View File
@@ -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