File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[submodule "pkg/pdp/smartcontracts/contracts/pdp "]
22 path = pkg/pdp/smartcontracts/contracts/pdp
33 url = https://github.com/FilOzone/pdp.git
4+ ignore = dirty
45[submodule "pkg/pdp/smartcontracts/contracts/filecoin-services "]
56 path = pkg/pdp/smartcontracts/contracts/filecoin-services
67 url = https://github.com/FilOzone/filecoin-services.git
8+ ignore = dirty
Original file line number Diff line number Diff line change @@ -4,23 +4,36 @@ DATE=$(shell date -u -Iseconds)
44GOFLAGS=-ldflags ="-X github.com/storacha/piri/pkg/build.version=$(VERSION ) -X github.com/storacha/piri/pkg/build.Commit=$(COMMIT ) -X github.com/storacha/piri/pkg/build.Date=$(DATE ) -X github.com/storacha/piri/pkg/build.BuiltBy=make"
55TAGS? =
66
7- .PHONY : all build piri install test clean calibnet mockgen check-docs-links
7+ .PHONY : all build install test clean calibnet mockgen check-docs-links
88
99all : build
1010
11- build : piri
11+ # Git submodules
12+ build/.update-modules :
13+ git submodule update --init --recursive
14+ touch $@
1215
13- piri :
14- go build $(GOFLAGS ) $(TAGS ) -o ./piri github.com/storacha/piri/cmd
16+ build : build/.update-modules piri
17+
18+ # piri depends on Go sources - use shell to check if rebuild needed
19+ piri : FORCE
20+ @if [ ! -f piri ] || \
21+ [ -n " $$ (find cmd pkg internal -name '*.go' -type f -newer piri 2>/dev/null)" ]; then \
22+ echo " Building piri..." ; \
23+ go build $(GOFLAGS ) $(TAGS ) -o ./piri github.com/storacha/piri/cmd; \
24+ fi
25+
26+ FORCE :
1527
1628install :
1729 go install ./cmd/storage
1830
19- test :
31+ test : build
2032 go test ./...
2133
2234clean :
2335 rm -f ./piri
36+ rm -f build/.update-modules
2437
2538mockgen :
2639 mockgen -source=./pkg/pdp/aggregator/interface.go -destination=./internal/mocks/aggregator.go -package=mocks
You can’t perform that action at this time.
0 commit comments