-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (28 loc) · 898 Bytes
/
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
NODE_IMAGE := $(shell grep 'FROM' Dockerfile | cut -d' ' -f2)
OCI_RUNTIME := $(shell command -v podman 2>/dev/null || command -v docker || echo "docker or podman")
build: $(OCI_RUNTIME)
$(OCI_RUNTIME) build . \
-t ghcr.io/blockloop/hubot:$(shell git rev-parse --short HEAD)
run: $(OCI_RUNTIME)
$(OCI_RUNTIME) run \
--rm \
-it \
-v "$(CURDIR):$(CURDIR):z" \
-w "$(CURDIR)" \
--env-file hubot.env \
--entrypoint $(PWD)/bin/hubot \
$(NODE_IMAGE)
packages: $(OCI_RUNTIME)
$(OCI_RUNTIME) run \
--rm \
-it \
-v "$(CURDIR):$(CURDIR):z" \
-w "$(CURDIR)" \
$(NODE_IMAGE) \
npm install --save
# used for scripts/fortune.js
fortunes.txt: fortunes.tar.gz
@tar -zxf $<
@cat fortune-master/datfiles/{fortunes,fortunes2,fortunes2-o,fortunes-o,limerick,startrek} > $@
fortunes.tar.gz:
@curl -LJ -o fortunes.tar.gz 'https://github.com/ahills/fortune/archive/master.tar.gz'