-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile.example
More file actions
63 lines (48 loc) · 1.92 KB
/
Copy pathMakefile.example
File metadata and controls
63 lines (48 loc) · 1.92 KB
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
###
# general configuration of the makefile itself
###
SHELL := /bin/bash
.DEFAULT_GOAL := help
.PHONY: help
help:
@mh -f $(MAKEFILE_LIST) $(target) || echo "Please install mh from https://github.com/oz123/mh/releases"
ifndef target
@(which mh > /dev/null 2>&1 && echo -e "\nUse \`make help target=foo\` to learn more about foo.")
endif
VERSION ?= $(shell git describe --always)#? version
REGISTRY ?=docker.io#? container registry to push
IMG ?= $(shell basename $(CURDIR))#? image name
OPTS ?=#? add extra OPTS to misc commands
ORG ?= oz123#? organization to push
ifneq (,$(wildcard ./.env))
include .env
export
endif
bdbbb/color: HOST ?= localhost #? what host is running NGinx
bbbbb/color: COLOR ?= green #? which color should be the backround
bbbbb/color: ## test that the HOST shows background COLOR
curl -k -L $(HOST) | grep -qc "background: $(COLOR)"
some/people/organize/their/targets/like/directories: ## you know just because you can
echo very long target name ay?
color-0: ## test target with number
echo target with 0
h2o: ## water should match too
echo water
r2d2: ## robots
echo beep boop beep
color-1: ## test target with number
echo target with number
12456-: ## test target with numbers
echo target with numbers
ffff-color: HOST ?= localhost #? what host is running NGinx
ffff-color: COLOR ?= green #? which color should be the backround
ffff-color: ## test that the HOST shows background COLOR
curl -k -L $(HOST) | grep -qc "background: $(COLOR)"
test_color: HOST ?= localhost #? what host is running NGinx
test_color: COLOR ?= green #? which color should be the backround
test_color: ## test that the HOST shows background COLOR
curl -k -L $(HOST) | grep -qc "background: $(COLOR)"
docker-build:: ## build a docker image
echo docker build $(OPTS) -t $(REGISTRY)/$(ORG)/$(IMG):v$(VERSION) -f Dockerfile .
docker-push:: ## push docker image to $(REGISTRY)
echo docker push $(REGISTRY)/$(ORG)/$(IMG):v$(VERSION)