forked from galaxyproject/galaxy-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (29 loc) · 1.61 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
40
41
42
43
44
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
DOCKER_NOUSER=docker run -v `pwd`:/tmp/hub -w /tmp/hub
node_modules: package.json
npm install
npm-deps: node_modules
.DEFAULT_GOAL := all
bower_components: bower.json
./node_modules/bower/bin/bower install
bower: bower_components
all: help
help:
@echo "There are no default actions for this Makefile, you must choose an option from the following:"
@egrep '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\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
check: npm-deps bower ## Check for broken links
$(COFFEE) build.coffee --check
docker-npm-deps: ## [Docker] Install NodeJS dependencies.
$(DOCKER_NOUSER) node /bin/bash -c "npm install && chown -R `id -u`:`id -g` /tmp/hub/node_modules"
docker-bower: ## [Docker] Install Bower
$(DOCKER_NOUSER) 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 ## [Docker] 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
.PHONY: gitlfs-pull docker-build docker-bower docker-npm-deps check watch serve build