|
1 | | -GITCOMMIT ?= $(shell git rev-parse HEAD) |
2 | | -GITDATE ?= $(shell git show -s --format='%ct') |
| 1 | +DEPRECATED_TARGETS := ecotone-scalar receipt-reference-builder test op-deployer fuzz sync-standard-version |
3 | 2 |
|
4 | | -# Find the github tag that points to this commit. If none are found, set the version string to "untagged" |
5 | | -# Prioritizes release tag, if one exists, over tags suffixed with "-rc" |
6 | | -VERSION ?= $(shell tags=$$(git tag --points-at $(GITCOMMIT) | grep '^op-deployer/' | sed 's/op-deployer\///' | sort -V); \ |
7 | | - preferred_tag=$$(echo "$$tags" | grep -v -- '-rc' | tail -n 1); \ |
8 | | - if [ -z "$$preferred_tag" ]; then \ |
9 | | - if [ -z "$$tags" ]; then \ |
10 | | - echo "untagged"; \ |
11 | | - else \ |
12 | | - echo "$$tags" | tail -n 1; \ |
13 | | - fi \ |
14 | | - else \ |
15 | | - echo $$preferred_tag; \ |
16 | | - fi) |
17 | | - |
18 | | -LDFLAGSSTRING +=-X main.GitCommit=$(GITCOMMIT) |
19 | | -LDFLAGSSTRING +=-X main.GitDate=$(GITDATE) |
20 | | -LDFLAGSSTRING +=-X github.com/ethereum-optimism/optimism/op-chain-ops/deployer/version.Version=$(VERSION) |
21 | | -LDFLAGSSTRING +=-X github.com/ethereum-optimism/optimism/op-chain-ops/deployer/version.Meta=$(VERSION_META) |
22 | | -LDFLAGS := -ldflags "$(LDFLAGSSTRING)" |
23 | | - |
24 | | -# Use the old Apple linker to workaround broken xcode - https://github.com/golang/go/issues/65169 |
25 | | -ifeq ($(shell uname),Darwin) |
26 | | - FUZZLDFLAGS := -ldflags=-extldflags=-Wl,-ld_classic |
27 | | -endif |
28 | | - |
29 | | -ecotone-scalar: |
30 | | - go build -o ./bin/ecotone-scalar ./cmd/ecotone-scalar/main.go |
31 | | - |
32 | | -receipt-reference-builder: |
33 | | - go build -o ./bin/receipt-reference-builder ./cmd/receipt-reference-builder/*.go |
34 | | - |
35 | | -test: |
36 | | - go test ./... |
37 | | - |
38 | | -op-deployer: |
39 | | - GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) CGO_ENABLED=0 go build -v $(LDFLAGS) -o ./bin/op-deployer ../op-deployer/cmd/op-deployer/main.go |
40 | | - |
41 | | -fuzz: |
42 | | - printf "%s\n" \ |
43 | | - "go test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzEncodeDecodeWithdrawal ./crossdomain" \ |
44 | | - "go test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzEncodeDecodeLegacyWithdrawal ./crossdomain" \ |
45 | | - "go test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzAliasing ./crossdomain" \ |
46 | | - "go test $(FUZZLDFLAGS) -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzVersionedNonce ./crossdomain" \ |
47 | | - | parallel -j 8 {} |
48 | | - |
49 | | - |
50 | | -sync-standard-version: |
51 | | - curl -Lo ./deployer/opcm/standard-versions-mainnet.toml https://raw.githubusercontent.com/ethereum-optimism/superchain-registry/refs/heads/main/validation/standard/standard-versions-mainnet.toml |
52 | | - curl -Lo ./deployer/opcm/standard-versions-sepolia.toml https://raw.githubusercontent.com/ethereum-optimism/superchain-registry/refs/heads/main/validation/standard/standard-versions-sepolia.toml |
53 | | - |
54 | | -.PHONY: test fuzz op-deployer sync-standard-version |
| 3 | +include ../just/deprecated.mk |
0 commit comments