-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 1013 Bytes
/
Makefile
File metadata and controls
41 lines (31 loc) · 1013 Bytes
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
.PHONY: annotate install-annotate install migrate deploy
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
open_command := xdg-open
luarocks_command := luarocks
endif
ifeq ($(UNAME), Darwin)
open_command := open
luarocks_command := bin/luarocks-macos
endif
default:
@echo "Please specify a target."
annotate:
lapis annotate --preload-module "models" models/*.lua
install-annotate:
$(luarocks_command) install --lua-version=5.1 https://raw.githubusercontent.com/snap-cloud/lapis-annotate/support-native-lua/lapis-annotate-dev-1.rockspec
install:
$(luarocks_command) install --only-deps snapcloud-dev-0.rockspec
npm install
$(MAKE) install-annotate
db:
db/init.sh
migrate:
bin/lapis-migrate
branch ?= $(shell git rev-parse --abbrev-ref HEAD)
deploy:
ssh snap.berkeley.edu "cd snapCloud/; bin/deploy ${branch}"
$(open_command) "https://snap.berkeley.edu/"
deploy-staging:
ssh staging.snap.berkeley.edu "cd snapCloud/; bin/deploy ${branch}"
$(open_command) "https://staging.snap.berkeley.edu/"