forked from felipepenha/rust-greenhouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (34 loc) · 1.05 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
BUILD = docker-compose build
RUN = docker-compose run
VERSION = $(shell awk -F ' = ' '$$1 ~ /version/ { gsub(/[\"]/, "", $$2); printf("%s",$$2) }' Cargo.toml)
help:
@echo "USAGE"
@echo
@echo " make <command>"
@echo " Include 'sudo' when necessary."
@echo
@echo
@echo "COMMANDS"
@echo
@echo " build build image using cache"
@echo " build-no-cache build image from scratch, and not from cache"
@echo " bash bash REPL (Read-Eval-Print loop), suitable for debugging"
@echo " rust access rust through the Evcxr REPL (Read-Eval-Print loop)"
@echo " rust-jupyter access rust through the Evcxr Jupyter Notebook"
@echo " release Release VERSION (specified in Cargo.toml) on the dev branch"
#################
# User Commands #
#################
build:
$(BUILD)
build-no-cache:
$(BUILD) --no-cache
bash:
$(RUN) bash
rust:
$(RUN) rust
rust-jupyter:
$(RUN) --service-ports rust-jupyter
release:
git tag -a $(VERSION) -m "Auto-generated release $(VERSION)"
git push origin dev tag $(VERSION)