-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
54 lines (39 loc) · 1.25 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
45
46
47
48
49
50
51
52
53
54
export ARA_ROOT=$(PWD)
export ARA_CONFIG=$(PWD)/config
run: # for dev
go run -race ara.go api
convert:
go run ara.go convert $(SCHEMA_NAME)
test_migrations:
ARA_ENV=test go run ara.go migrate up
dev_migrations:
go run ara.go migrate up
migrations: dev_migrations test_migrations
rollback_migrations:
go run ara.go migrate down
ARA_ENV=test go run ara.go migrate down
populate:
psql -U ara -d ara -a -f model/populate.sql
tests:
go test -coverprofile=coverage.out -p 1 -count 1 ./...
cucumber:
bundle exec cucumber -t 'not @wip'
gen_gtfsrt_bindings:
wget https://raw.githubusercontent.com/google/transit/master/gtfs-realtime/proto/gtfs-realtime.proto
protoc --go_out=. --go_opt=Mgtfs-realtime.proto=gtfs/ gtfs-realtime.proto
rm gtfs-realtime.proto
go_dependencies:
go mod vendor
ruby_dependencies:
MAKE="make --jobs $(nproc)" bundle install --jobs `nproc` --path vendor/bundle
dependencies: go_dependencies ruby_dependencies
build:
go install -v ./...
mkdir -p build
install --mode=+x ${GOPATH}/bin/ara build
install -t build/db/migrations -D db/migrations/*.sql
install -t build/siri/templates -D siri/templates/*.template
install -t build/config -D config/config.yml config/database.yml config/test.yml
mkdir -p build/config
clean:
rm -rf build