Skip to content
This repository was archived by the owner on May 22, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,22 @@ watc%: dev-n-ui ## watch: Watch for static asset changes.
ci-n-ui-check:
# In CircleCI
ifneq ($(CIRCLE_BUILD_NUM),)

# The app is using n-ui
ifneq ($(shell grep -s -Fim 1 n-ui bower.json),)

# package.json and bower.json files both exist
ifneq ($(wildcard bower_components/n-ui/.bower.json),)
ifneq ($(wildcard node_modules/@financial-times/n-ui/package.json),)

# versions in package.json and bower.json are not equal
ifneq ($(shell awk '$$1 == "\"version\":" {print $$2}' bower_components/n-ui/.bower.json | sed s/,//),$(shell awk '$$1 == "\"version\":" {print $$2}' node_modules/@financial-times/n-ui/package.json | sed s/,//))
$(error 'Projects using n-ui must maintain parity between versions. Rebuild without cache and update your bower.json and package.json if necessary')
endif
endif
endif
endif
endif

# Remind developers that if they want to use a local version of n-ui,
# they need to `export NEXT_APP_SHELL=local`
Expand Down