-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (52 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
PROJECT = rindek/rmud
BUILD_TAG = build-local
IMAGE_TAG = $(PROJECT):$(BUILD_TAG)
ENVFILE = "./.env"
VOLUMES = /dummy
export IMAGE_TAG
export ENVFILE
export VOLUMES
revision:
$(eval GIT_COMMIT = $(shell git rev-parse HEAD))
echo $(GIT_COMMIT) > REVISION.txt
build-dev: revision
docker build \
-f Dockerfile.dev \
--tag $(IMAGE_TAG) \
--label "git_commit=$(GIT_COMMIT)" \
.
build-dev-truffle: revision
docker build \
-f Dockerfile.truffle-native \
--tag $(IMAGE_TAG) \
--label "git_commit=$(GIT_COMMIT)" \
.
build-dev-truffle-graalvm: revision
docker build \
-f Dockerfile.truffle-graalvm \
--tag $(IMAGE_TAG) \
--label "git_commit=$(GIT_COMMIT)" \
.
dev: build-dev
@ [ -e .env.development ] || cp -v .env.example .env.development
VOLUMES=.:/app \
ENVFILE=./.env.development \
docker-compose -p rmudev -f docker-compose-dev.yml run --service-ports --rm app 'sh -l'
dev-truffle: build-dev-truffle
@ [ -e .env.development ] || cp -v .env.example .env.development
VOLUMES=.:/app \
ENVFILE=./.env.development \
docker-compose -p rmudev -f docker-compose-dev.yml run --service-ports --rm app 'bash -l'
dev-truffle-graalvm: build-dev-truffle-graalvm
@ [ -e .env.development ] || cp -v .env.example .env.development
VOLUMES=.:/app \
ENVFILE=./.env.development \
docker-compose -p rmudev -f docker-compose-dev.yml run --service-ports --rm app 'bash -l'
test:
STAGE=test bundle exec rspec -f d
run:
ruby rmud.rb
run-prod:
ruby --jvm rmud.rb
seed:
bundle exec rake world:seed