Skip to content

Commit f16be8c

Browse files
committed
fix make process, co right submodules
- polish
1 parent bc61420 commit f16be8c

5 files changed

Lines changed: 48 additions & 1544 deletions

File tree

.gitmodules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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

Makefile

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,36 @@ DATE=$(shell date -u -Iseconds)
44
GOFLAGS=-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"
55
TAGS?=
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

99
all: 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

1628
install:
1729
go install ./cmd/storage
1830

19-
test:
31+
test: build
2032
go test ./...
2133

2234
clean:
2335
rm -f ./piri
36+
rm -f build/.update-modules
2437

2538
mockgen:
2639
mockgen -source=./pkg/pdp/aggregator/interface.go -destination=./internal/mocks/aggregator.go -package=mocks

0 commit comments

Comments
 (0)