forked from galaxyproject/galaxy-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (27 loc) · 1.49 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
COFFEE=DEBUG=metalsmith-timer ./node_modules/coffee-script/bin/coffee
DOCKER=docker run -u `id -u`:`id -g` -v `pwd`:/tmp/hub -w /tmp/hub
npm-deps: ## Install NodeJS dependencies.
npm install
.DEFAULT_GOAL := all
bower:
./node_modules/bower/bin/bower install
all: help
help:
@echo "There are no default actions for this Makefile, you must choose an option from the following:\n"
@egrep '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
build: npm-deps bower ## Builds into /build, suitable for copying to webserver.
$(COFFEE) build.coffee
serve: npm-deps bower ## Serve locally for viewing
$(COFFEE) build.coffee --serve
watch: npm-deps bower ## will serve and attempt to reload files
$(COFFEE) build.coffee --watch
check: npm-deps bower ## checks for broken links
$(COFFEE) build.coffee --check
docker-npm-deps:
docker run -v `pwd`:/tmp/hub -w /tmp/hub node /bin/bash -c "npm install && chown -R `id -u`:`id -g` /tmp/hub/node_modules"
docker-bower:
docker run -v `pwd`:/tmp/hub -w /tmp/hub node /bin/bash -c "node node_modules/bower/bin/bower --allow-root install && chown -R `id -u`:`id -g` /tmp/hub/bower_components"
docker-build: docker-npm-deps docker-bower ## Single endpoint for docker install
$(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) dannon/gitlfs git lfs pull