@@ -77,10 +77,15 @@ build: frontend/build go/bin ## Do a production build (requiring the frontend bu
77
77
build-dev : # # Do a dev build (without requiring the frontend)
78
78
$(MAKE ) EMBEDASSETS=" " go/bin
79
79
80
-
81
80
.PHONY : frontend/build
82
81
frontend/build :
83
- docker build -f cmd/pyroscope/frontend.Dockerfile --output=public/build .
82
+ docker build -f cmd/pyroscope/frontend.Dockerfile --output=public/build .
83
+
84
+ .PHONY : profilecli/build
85
+ profilecli/build : go/bin-profilecli # # Build the profilecli binary
86
+
87
+ .PHONY : pyroscope/build
88
+ pyroscope/build : go/bin-pyroscope # # Build just the pyroscope binary
84
89
85
90
.PHONY : release
86
91
release/prereq : $(BIN ) /goreleaser # # Ensure release pre requesites are met
@@ -110,18 +115,31 @@ release/build: release/prereq ## Build current platform release binaries
110
115
go/deps :
111
116
$(GO ) mod tidy
112
117
113
- define go_build
118
+ define go_build_pyroscope
114
119
GOOS=$(GOOS ) GOARCH=$(GOARCH ) CGO_ENABLED=0 $(GO ) build -tags "netgo $(EMBEDASSETS ) " -ldflags "-extldflags \"-static\" $(1 ) " ./cmd/pyroscope
120
+ endef
121
+
122
+ define go_build_profilecli
115
123
GOOS=$(GOOS ) GOARCH=$(GOARCH ) CGO_ENABLED=0 $(GO ) build -ldflags "-extldflags \"-static\" $(1 ) " ./cmd/profilecli
116
124
endef
117
125
118
126
.PHONY : go/bin-debug
119
127
go/bin-debug :
120
- $(call go_build,$(GO_LDFLAGS ) )
128
+ $(call go_build_pyroscope,$(GO_LDFLAGS ) )
129
+ $(call go_build_profilecli,$(GO_LDFLAGS ) )
121
130
122
131
.PHONY : go/bin
123
132
go/bin :
124
- $(call go_build,-s -w $(GO_LDFLAGS ) )
133
+ $(call go_build_pyroscope,-s -w $(GO_LDFLAGS ) )
134
+ $(call go_build_profilecli,-s -w $(GO_LDFLAGS ) )
135
+
136
+ .PHONY : go/bin-pyroscope-debug
137
+ go/bin-pyroscope-debug :
138
+ $(call go_build_pyroscope,$(GO_LDFLAGS ) )
139
+
140
+ .PHONY : go/bin-profilecli-debug
141
+ go/bin-profilecli :
142
+ $(call go_build_profilecli,$(GO_LDFLAGS ) )
125
143
126
144
.PHONY : go/lint
127
145
go/lint : $(BIN ) /golangci-lint
@@ -180,7 +198,7 @@ define deploy
180
198
--set pyroscope.podAnnotations."profiles\.grafana\.com\/goroutine\.port_name"=http-metrics \
181
199
--set pyroscope.extraEnvVars.JAEGER_AGENT_HOST=jaeger.monitoring.svc.cluster.local. \
182
200
--set pyroscope.extraArgs."pyroscopedb\.max-block-duration"=5m
183
- endef
201
+ endef
184
202
185
203
.PHONY : docker-image/pyroscope/build-debug
186
204
docker-image/pyroscope/build-debug : GOOS=linux
0 commit comments