Skip to content

Commit

Permalink
- adjust Makefile syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
almir committed Nov 3, 2015
1 parent 2026328 commit b7081f3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
DOCKER_IMAGE_NAME=adnanh/webhook
CONTAINER_NAME=webhook
DOCKER_IMAGE_NAME = adnanh/webhook
CONTAINER_NAME = webhook
COMMIT := $(shell git rev-parse HEAD)
SHORTCOMMIT := $(shell git rev-parse HEAD|cut -c-7)
TEMPDIR := $(shell mktemp -d)


docker-build: Dockerfile
docker build --force-rm=true --tag=${DOCKER_IMAGE_NAME} .
docker build --force-rm=true --tag=$(DOCKER_IMAGE_NAME) .

docker-run:
@echo "Here's an example command on how to run a webhook container:"
@echo "docker run -d -p 9000:9000 -v /etc/webhook:/etc/webhook --name=${CONTAINER_NAME} \\"
@echo " ${DOCKER_IMAGE_NAME} -verbose -hooks=/etc/webhook/hooks.json -hotreload"
@echo "docker run -d -p 9000:9000 -v /etc/webhook:/etc/webhook --name=$(CONTAINER_NAME) \\"
@echo " $(DOCKER_IMAGE_NAME) -verbose -hooks=/etc/webhook/hooks.json -hotreload"

build_rpm:
git archive --format=tar.gz --prefix webhook-$(COMMIT)/ --output $(TEMPDIR)/webhook-$(SHORTCOMMIT).tar.gz $(COMMIT)
rpmbuild -ta --define "_commit $(COMMIT)" $(TEMPDIR)/webhook-$(SHORTCOMMIT).tar.gz

0 comments on commit b7081f3

Please sign in to comment.