Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update Makefile #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ PREFIX ?= pathwar/
PATHWAR_OPTS ?=

.PHONY: pathwar.run
pathwar.run:
pathwar $(PATHWAR_OPTS) compose prepare --no-push ./ > pathwar-compose.yml
pathwar.run: pathwar.prepare
pathwar $(PATHWAR_OPTS) compose up --force-recreate pathwar-compose.yml

.PHONY: pathwar.down
Expand All @@ -18,14 +17,23 @@ pathwar.ps:
docker.build:
docker-compose build --pull

.PHONY: pathwar-prepare
.PHONY: pathwar.prepare
pathwar.prepare:
pathwar $(PATHWAR_OPTS) compose prepare --prefix=$(PREFIX) --no-push .
pathwar $(PATHWAR_OPTS) compose prepare --no-push . > pathwar-compose.yml

.PHONY: pathwar-push
.PHONY: pathwar.push
pathwar.push:
pathwar $(PATHWAR_OPTS) compose prepare --prefix=$(PREFIX) .
pathwar $(PATHWAR_OPTS) compose prepare --prefix=$(PREFIX) . > pathwar-compose.yml

.PHONY: docker.pathwar.push
docker.pathwar.push:
docker run -it --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v "$(PWD):$(PWD)" -w "$(PWD)" pathwar/agent compose prepare --prefix=$(PREFIX) . > pathwar-compose.yml

.PHONY: pathwar.register
pathwar.register:
pathwar $(PATHWAR_OPTS) compose register --print ./pathwar-compose.yml > _register.sh
chmod +x _register.sh

.PHONY: make.bump
make.bump:
wget -O rules.mk https://raw.githubusercontent.com/tree/master/challenges/challenge.mk Makefile
wget -O Makefile https://raw.githubusercontent.com/pathwar/pathwar/master/challenges/challenge.mk