Skip to content

Commit 2f934fc

Browse files
committed
refactor
Signed-off-by: Rez Moss <hi@rezmoss.com>
1 parent 3939e48 commit 2f934fc

60 files changed

Lines changed: 3933 additions & 3025 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.goreleaser.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ before:
1111

1212
builds:
1313
- id: binary
14+
main: ./cmd/sbomlyze
1415
goos:
1516
- windows
1617
- darwin
@@ -24,12 +25,13 @@ builds:
2425
goarch: arm64
2526
ldflags:
2627
- -s -w
27-
- -X main.version={{.Version}}
28-
- -X main.commit={{.Commit}}
29-
- -X main.date={{.Date}}
30-
- -X main.buildSource=binaryRelease
28+
- -X github.com/rezmoss/sbomlyze/internal/version.Version={{.Version}}
29+
- -X github.com/rezmoss/sbomlyze/internal/version.Commit={{.Commit}}
30+
- -X github.com/rezmoss/sbomlyze/internal/version.Date={{.Date}}
31+
- -X github.com/rezmoss/sbomlyze/internal/version.BuildSource=binaryRelease
3132

3233
- id: binary-arm
34+
main: ./cmd/sbomlyze
3335
goos:
3436
- linux
3537
goarch:
@@ -39,10 +41,10 @@ builds:
3941
- "7"
4042
ldflags:
4143
- -s -w
42-
- -X main.version={{.Version}}
43-
- -X main.commit={{.Commit}}
44-
- -X main.date={{.Date}}
45-
- -X main.buildSource=binaryRelease
44+
- -X github.com/rezmoss/sbomlyze/internal/version.Version={{.Version}}
45+
- -X github.com/rezmoss/sbomlyze/internal/version.Commit={{.Commit}}
46+
- -X github.com/rezmoss/sbomlyze/internal/version.Date={{.Date}}
47+
- -X github.com/rezmoss/sbomlyze/internal/version.BuildSource=binaryRelease
4648

4749
archives:
4850
- id: default

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all test lint build
1+
.PHONY: all test lint build build-quick clean
22

33
all: test lint build
44

@@ -11,4 +11,12 @@ lint:
1111
build:
1212
@which goreleaser > /dev/null || (echo "goreleaser not found. Install: go install github.com/goreleaser/goreleaser/v2@latest" && exit 1)
1313
goreleaser build --snapshot --clean
14-
@echo "Build artifacts in ./dist/"
14+
@echo "Build artifacts in ./dist/"
15+
16+
# Quick build for development
17+
build-quick:
18+
go build -o sbomlyze ./cmd/sbomlyze
19+
@echo "Built ./sbomlyze"
20+
21+
clean:
22+
rm -rf dist/ sbomlyze

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ A fast, reliable SBOM diff and analysis tool. Compare Software Bill of Materials
2020
## Installation
2121

2222
```bash
23-
go install github.com/rezmoss/sbomlyze@latest
23+
go install github.com/rezmoss/sbomlyze/cmd/sbomlyze@latest
2424
```
2525

2626
Or build from source:
2727

2828
```bash
2929
git clone https://github.com/rezmoss/sbomlyze.git
3030
cd sbomlyze
31-
go build -o sbomlyze .
31+
go build -o sbomlyze ./cmd/sbomlyze
3232
```
3333

3434
## Quick Start
@@ -576,18 +576,20 @@ golangci-lint run ./...
576576
### Build
577577

578578
```bash
579-
make build
579+
make build-quick
580580
# or
581-
go build -o sbomlyze .
581+
go build -o sbomlyze ./cmd/sbomlyze
582582
```
583583

584584
### Make Commands
585585

586586
```bash
587-
make all # Run test, lint, and build
588-
make test # Run all tests
589-
make lint # Run golangci-lint
590-
make build # Build with goreleaser (snapshot)
587+
make all # Run test, lint, and build
588+
make test # Run all tests
589+
make lint # Run golangci-lint
590+
make build # Build with goreleaser (snapshot)
591+
make build-quick # Quick build for development
592+
make clean # Remove build artifacts
591593
```
592594

593595

0 commit comments

Comments
 (0)