3

I'm not familiar with MAKEFILE and trying to figure out how to wait between destroy and deploy for 2 seconds.

It looks like NMAKE has very limited resource on internet and the one I found sleep 2 throws 'sleep' is not recognized as an internal or external command, operable program or batch file.

I'm working on WINDOWS not LINUX.

REGISTRY=registry.ilerler.info
IMAGE=ilerler.geocode.host
TAG=latest

MARATHON=http://mesos.ilerler.com/v2/apps/geocode
PAYLOAD=Marathon_geocode.json

.PHONY: deploy

push:
    docker push $(REGISTRY)/$(IMAGE):$(TAG)

destroy:push
    curl -X DELETE $(MARATHON)
    echo Waiting
    sleep 2

deploy:destroy
    curl -X PUT -H "Content-Type: application/json" $(MARATHON) -d@$(PAYLOAD)
cilerler
  • 7,774
  • 8
  • 51
  • 81

1 Answers1

5

Try the timeout command:

timeout 3

Note that I intentionally wrote 3 to assure that two seconds passed (instead of 2: the current second will pass and then another one). See more about it in here.

Shmuel H.
  • 1,840
  • 1
  • 13
  • 26