Skip to content

Commit

Permalink
Slight dedupe in makefile, use standard docker invocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Jan 10, 2017
1 parent d031f51 commit ca554f1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
COFFEE=DEBUG=metalsmith-timer ./node_modules/coffee-script/bin/coffee
DOCKER=docker run -u `id -u`:`id -g` -v `pwd`:/usr/src/app -w /usr/src/app

npm-deps: ## Install NodeJS dependencies.
npm install
Expand Down Expand Up @@ -26,13 +27,13 @@ check: npm-deps bower ## checks for broken links
$(COFFEE) build.coffee --check

docker-npm-deps:
docker run -u `id -u`:`id -g` -v `pwd`:/usr/src/app -w /usr/src/app node npm install
$(DOCKER) node npm install

docker-bower:
docker run -u `id -u`:`id -g` -v `pwd`:/usr/src/app -w /usr/src/app node node node_modules/bower/bin/bower --allow-root install
$(DOCKER) node node node_modules/bower/bin/bower --allow-root install

docker-build: docker-npm-deps docker-bower ## Single endpoint for docker install
docker run -u `id -u`:`id -g` -v `pwd`:/usr/src/app -w /usr/src/app node node node_modules/coffee-script/bin/coffee build.coffee
$(DOCKER) node node node_modules/coffee-script/bin/coffee build.coffee

gitlfs-pull: ## We use this during the Jenkins build process to fetch LFS contents -- probably not useful locally.
docker run -u `id -u`:`id -g` -v `pwd`:/usr/src/app -w /usr/src/app dannon/gitlfs git lfs pull
$(DOCKER) dannon/gitlfs git lfs pull

0 comments on commit ca554f1

Please sign in to comment.