Skip to content

Commit 87d9a4d

Browse files
committed
build: improve Makefile consistency and cleanliness for launch
- Make `clean` also remove dist/ (used by goreleaser) - Make `build-all` run clean first for guaranteed fresh artifacts - Add pastelocal-remote to darwin build targets for full platform parity - Ensures no old binaries (e.g. clipbridge*) can appear after `make build` or `make build-all`
1 parent 215aa2d commit 87d9a4d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ build:
1212
$(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/pastelocald ./cmd/pastelocald
1313
$(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/pastelocal-remote ./cmd/pastelocal-remote
1414

15-
build-all: build-linux-amd64 build-linux-arm64 build-darwin-arm64 build-darwin-amd64
15+
build-all: clean build-linux-amd64 build-linux-arm64 build-darwin-arm64 build-darwin-amd64
1616

1717
build-linux-amd64:
1818
GOOS=linux GOARCH=amd64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/pastelocal-remote-linux-amd64 ./cmd/pastelocal-remote
@@ -27,10 +27,12 @@ build-linux-arm64:
2727
build-darwin-arm64:
2828
GOOS=darwin GOARCH=arm64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/pastelocal-darwin-arm64 ./cmd/pastelocal
2929
GOOS=darwin GOARCH=arm64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/pastelocald-darwin-arm64 ./cmd/pastelocald
30+
GOOS=darwin GOARCH=arm64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/pastelocal-remote-darwin-arm64 ./cmd/pastelocal-remote
3031

3132
build-darwin-amd64:
3233
GOOS=darwin GOARCH=amd64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/pastelocal-darwin-amd64 ./cmd/pastelocal
3334
GOOS=darwin GOARCH=amd64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/pastelocald-darwin-amd64 ./cmd/pastelocald
35+
GOOS=darwin GOARCH=amd64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/pastelocal-remote-darwin-amd64 ./cmd/pastelocal-remote
3436

3537
test:
3638
$(GO) test -v -race -cover ./internal/...
@@ -43,7 +45,7 @@ lint: vet
4345
gosec ./...
4446

4547
clean:
46-
rm -rf bin/
48+
rm -rf bin/ dist/
4749

4850
install: build
4951
install -m 0755 bin/pastelocal $(GOPATH)/bin/pastelocal

0 commit comments

Comments
 (0)