Skip to content

Commit

Permalink
Add .PHONY targets and update prepare task
Browse files Browse the repository at this point in the history
  • Loading branch information
bootjp committed May 19, 2024
1 parent fcae327 commit 4ec1760
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
SHELL := /bin/bash

run: clean prepare runA runB runC
.PHONY: run prepare clean runA runB runC

prepare:
mkdir -p /tmp/my-raft-cluster/{nodeA,nodeB,nodeC}
# runA runB runC を同時に実行する
run: prepare runA runB runC

clean:
prepare:
@echo "Preparing..."
rm -rf /tmp/my-raft-cluster/
mkdir -p /tmp/my-raft-cluster/{nodeA,nodeB,nodeC}
@echo "Prepared"

runA:
go run main.go --raft_id=nodeA --address=localhost:50051 --redis_address=localhost:63791 --raft_data_dir /tmp/my-raft-cluster/nodeA --initial_peers "nodeB=localhost:50052|localhost:63792,nodeC=localhost:50053|localhost:63793"
Expand Down

0 comments on commit 4ec1760

Please sign in to comment.