# Makefile to compile and run tests with phantomjs # # "scyt/nodejs" container contains all necessary dependencies to run nodejs with npm, bower and phantomjs browser. # # The command below does the following steps: # - Runs the 10.4.16.33/scytl/nodejs container (-rm = The container is removed once the execution is finished) # - Mounts the project (current dir) to container's /app/ directory (with write privileges) # - Sets http_proxy (Otherwise ONE machines cannot fetch depedencies. http_proxy needs to be disabled to non-ONE machines, since the proxy is only visible by ONE) # - Runs 'make -B compile' _inside_ the container which: (-B is to force rebuild at Makefile) # - Runs npm install # - Runs bower install (passes --allow-root, otherwise bower fails with root user) # - Runs grunt (Which use karma to launch firefox for testing, http_proxy is unset so that firefox can connect to karma for testing) # By default docker target is executed all: compile --no-optional # This is run on the container to build the project compile: npm install --unsafe-perm --no-optional bower install --allow-root grunt release_patch: npm install --unsafe-perm --no-optional bower install --allow-root grunt bump:patch grunt grunt nexus -v git add Makefile bower.json package.json git commit -m "new patch release" git push master master release_minor: npm install --unsafe-perm --no-optional bower install --allow-root grunt bump:minor grunt grunt nexus git add Makefile bower.json package.json git commit -m "new minor release" git push master master release_major: npm install --unsafe-perm --no-optional bower install --allow-root grunt bump:major grunt grunt nexus git add Makefile bower.json package.json git commit -m "new major release" git push master master