forked from guillaumebo/innosetup-docker
-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
36 lines (30 loc) · 870 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
35
36
user := $(shell whoami)
git_branch := $(shell git rev-parse --abbrev-ref HEAD)
docker_tag := $(user)/innosetup:$(git_branch)
.PHONY: build
build: ## Build the Docker image
build:
docker build --pull -t $(docker_tag) .
.PHONY: test
test: ## Test the Docker image
test: clean
docker run --rm -i -v $(PWD):/work $(docker_tag) helloworld.iss
ls -al Output/HelloWorld.exe
.PHONY: shell
shell: ## Open a shell in the Docker container
shell:
docker run --rm -it -v $(PWD):/work --entrypoint /bin/bash $(docker_tag)
.PHONY: push
push: ## Publish to Docker Hub
docker push $(docker_tag)
.PHONY: clean
clean: ## Remove generated files
clean:
rm -rf Output
.PHONY: help
help: ## Show this help text
$(info usage: make [target])
$(info )
$(info Available targets:)
@awk -F ':.*?## *' '/^[^\t].+?:.*?##/ \
{printf " %-24s %s\n", $$1, $$2}' $(MAKEFILE_LIST)