Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (60 loc) · 2.51 KB
/
Copy pathMakefile
File metadata and controls
77 lines (60 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.PHONY: studio-e2e studio-e2e-native studio-e2e-web build build-convert install test test-convert test-convert-integration lint clean deps ios-driver ci-local ci-local-all
BINARY = probe
OUT_DIR = bin
VERSION = $(shell cat VERSION)
LDFLAGS = -ldflags="-s -w -X github.com/alphawavesystems/flutter-probe/internal/cli.Version=$(VERSION)"
## Download dependencies
deps:
go mod tidy
go mod download
## Build the probe binary
build: deps
@mkdir -p $(OUT_DIR)
go build $(LDFLAGS) -o $(OUT_DIR)/$(BINARY) ./cmd/probe
## Build probe-convert tool
build-convert:
cd tools/probe-convert && go build -ldflags="-s -w" -o ../../$(OUT_DIR)/probe-convert .
## Install probe to GOPATH/bin
install: deps
go install $(LDFLAGS) ./cmd/probe
## Cross-compile for all platforms
build-all: deps
@mkdir -p $(OUT_DIR)
GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o $(OUT_DIR)/probe-linux-amd64 ./cmd/probe
GOOS=darwin GOARCH=amd64 go build $(LDFLAGS) -o $(OUT_DIR)/probe-darwin-amd64 ./cmd/probe
GOOS=darwin GOARCH=arm64 go build $(LDFLAGS) -o $(OUT_DIR)/probe-darwin-arm64 ./cmd/probe
GOOS=windows GOARCH=amd64 go build $(LDFLAGS) -o $(OUT_DIR)/probe-windows-amd64.exe ./cmd/probe
## Run unit tests (probe CLI)
test:
go test ./...
## Run probe-convert unit tests
test-convert:
cd tools/probe-convert && go test ./convert/...
## Run probe-convert integration tests (golden files + lint + dry-run verify)
## Requires probe binary — builds it first if missing.
test-convert-integration: build build-convert
cd tools/probe-convert && go test -v -run "TestGoldenFiles|TestLintGeneratedOutput|TestVerifyDryRun" .
## Run the checks a pull request needs, locally (see scripts/ci-local.sh --help)
ci-local:
scripts/ci-local.sh
## The same, plus the Dart agent, Studio, VS Code extension and website checks
ci-local-all:
scripts/ci-local.sh --all
## Lint .probe test files in the tests/ directory
lint:
./$(OUT_DIR)/$(BINARY) lint tests/ || true
## Clean build artifacts
clean:
rm -rf $(OUT_DIR)
## Build the iOS system-dialog driver (XCUITest runner) -> bin/probe-ios-driver.zip
ios-driver:
scripts/build-ios-driver.sh bin
## Run the Studio native smoke set (macOS; drives the real Studio window on the second display that STUDIO_E2E_DISPLAY names)
studio-e2e-native:
scripts/studio-e2e.sh
## Deprecated alias of studio-e2e-native (removed in the next release)
studio-e2e:
@echo "make studio-e2e is deprecated: use make studio-e2e-native (same suite and STUDIO_E2E_DISPLAY rule)"
scripts/studio-e2e.sh
studio-e2e-web:
scripts/studio-e2e-web.sh