feat: improve inspur parsing and pci.ids integration
This commit is contained in:
7
Makefile
7
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: build run clean test build-all
|
||||
.PHONY: build run clean test build-all update-pci-ids
|
||||
|
||||
BINARY_NAME=logpile
|
||||
VERSION=$(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
||||
@@ -6,6 +6,7 @@ COMMIT=$(shell git rev-parse --short HEAD 2>/dev/null || echo "none")
|
||||
LDFLAGS=-ldflags "-X main.version=$(VERSION) -X main.commit=$(COMMIT)"
|
||||
|
||||
build:
|
||||
@if [ "$(SKIP_PCI_IDS_UPDATE)" != "1" ]; then ./scripts/update-pci-ids.sh --best-effort; fi
|
||||
CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY_NAME) ./cmd/logpile
|
||||
|
||||
run: build
|
||||
@@ -19,6 +20,7 @@ test:
|
||||
|
||||
# Cross-platform builds
|
||||
build-all: clean
|
||||
@if [ "$(SKIP_PCI_IDS_UPDATE)" != "1" ]; then ./scripts/update-pci-ids.sh --best-effort; fi
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-linux-amd64 ./cmd/logpile
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-linux-arm64 ./cmd/logpile
|
||||
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-darwin-amd64 ./cmd/logpile
|
||||
@@ -33,3 +35,6 @@ fmt:
|
||||
|
||||
lint:
|
||||
golangci-lint run
|
||||
|
||||
update-pci-ids:
|
||||
./scripts/update-pci-ids.sh --sync-submodule
|
||||
|
||||
Reference in New Issue
Block a user