-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (55 loc) · 1.51 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
66
67
68
MAKEFLAGS += --warn-undefined-variables -j1
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
.SUFFIXES:
.PHONY: shell install test
DOCKER ?= docker
GEM ?= gem
GIT ?= git
RAKE ?= rake
BIN_DIR ?= bin
DOCKER_IMAGE ?= jack12816/plankton
DOCKER_VERSION ?= $(shell $(GIT) describe)
all:
# Plankton
#
# install Install the dependencies
# shell Start an interactive shell session
# test Run the whole test suite
#
# release Alias to release-minor
# release-major Release a major version
# release-minor Release a minor version
# release-patch Release a patch version
#
# build Build the Docker image
# publish Push the Docker image
install:
# Install the dependencies
@$(BIN_DIR)/setup
shell:
# Start an interactive shell session
@$(BIN_DIR)/console
test: install
# Run the whole test suite
@$(RAKE) spec
build:
# Build the Docker image
@$(DOCKER) build -t $(DOCKER_IMAGE):$(DOCKER_VERSION) .
@$(DOCKER) tag $(DOCKER_IMAGE):$(DOCKER_VERSION) $(DOCKER_IMAGE):latest
publish:
# Push the Docker image
@$(DOCKER) push $(DOCKER_IMAGE):$(DOCKER_VERSION)
@$(DOCKER) push $(DOCKER_IMAGE):latest
release: release-minor
release-major:
# Release a major version
@$(GEM) bump --commit --tag --release --version major
release-minor:
# Release a minor version
@$(GEM) bump --commit --tag --release --version minor
release-patch:
# Release a patch version
@$(GEM) bump --commit --tag --release --version patch