Permalink
Browse files

closes #321, thanks!

  • Loading branch information...
1 parent 28d5026 commit 4237da8efa3b98d3aa2b46e680cdb6acbcabbdf6 @lancejpollard lancejpollard committed Oct 3, 2012
Showing with 20 additions and 2 deletions.
  1. +19 −1 Makefile
  2. +1 −1 package.json
View
@@ -8,6 +8,10 @@ PORT = 3210
TEST_URL = http://localhost:$(PORT)/?test=support,application,store,model
CLIENT_PID = null
TEST_SERVER_PATH = test/example/server
+# if node version is less than 8 (if you know how to clean this up, would love to know).
+NODE_VERSION = $(shell node --version)
+NODE_VERSION_LT_8 = $(shell node -e "console.log(process.version < 'v0.8.0')")
+NODE_VERSION_LT_6 = $(shell node -e "console.log(process.version < 'v0.6.0')")
PATH_SEP = $(shell node -e "console.log(require('path').sep)")
# darwin (mac), linux, win32 (windows)
@@ -25,6 +29,20 @@ endif
install-dependencies:
$(shell $(DEPENDENCIES))
+check-node-version:
+ifeq ($(NODE_VERSION_LT_8),true)
+ @echo ""
+ifeq ($(NODE_VERSION_LT_6),true)
+ @echo "> You're using an unsupported version of node ($(NODE_VERSION))."
+else
+ @echo "> You're using an outdated version of node ($(NODE_VERSION))."
+endif
+ @echo "> Please upgrade to the latest version node >= v0.8.2."
+ @echo ""
+endif
+
+post-install: install-dependencies check-node-version
+
all: clean
$(GRUNT) --config $(RUN)grunt.coffee
@@ -160,4 +178,4 @@ define get-processes
$(shell ps -ef | grep -e '$(1)' | grep -v grep)
endef
-.PHONY: all test-memory test-mongodb test test-all test-client build dist check-phantomjs check-grunt check-forever build-test-client start-test-client
+.PHONY: all test-memory test-mongodb test test-all test-client build dist check-phantomjs check-grunt check-forever build-test-client start-test-client post-install check-node-version
View
@@ -124,6 +124,6 @@
"test": "make test",
"start": "grunt start --config ./grunt.coffee",
"docs": "make docs",
- "postinstall": "make install-dependencies"
+ "postinstall": "make post-install"
}
}

0 comments on commit 4237da8

Please sign in to comment.