Add a passthru make target for running dokku commands within the vagrant vm

This commit is contained in:
Jose Diaz-Gonzalez
2014-10-04 18:38:37 -04:00
parent 14145eebb1
commit ab44c915a8

View File

@@ -6,7 +6,15 @@ STACK_URL ?= https://github.com/progrium/buildstep.git
PREBUILT_STACK_URL ?= https://github.com/progrium/buildstep/releases/download/2014-03-08/2014-03-08_429d4a9deb.tar.gz
DOKKU_ROOT ?= /home/dokku
.PHONY: all install copyfiles version plugins dependencies sshcommand pluginhook docker aufs stack count acl-add
# If the first argument is "dokku"...
ifeq (dokku,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "dokku"
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(RUN_ARGS):;@:)
endif
.PHONY: all install copyfiles version plugins dependencies sshcommand pluginhook docker aufs stack count acl-add dokku
all:
# Type "make install" to install.
@@ -75,3 +83,5 @@ count:
acl-add:
vagrant ssh -- sudo sshcommand acl-add dokku $(USER)
dokku:
vagrant ssh -- "sudo -H -u root bash -c 'dokku $(RUN_ARGS)'"