feat: make use of vendoring

This commit is contained in:
2026-02-23 13:38:19 +01:00
parent b571588b15
commit 0d9b7c4e7b
3 changed files with 18 additions and 5 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
_bin
.#*
.#*
vendor/

View File

@ -1,18 +1,21 @@
build:
mkdir -p _bin
go build -o _bin/donniemarko cmd/main.go
GOFLAGS=-mod=vendor go build -o _bin/donniemarko cmd/main.go
install:
cp bin/donniemarko ~/.local/bin/
vendor:
go mod vendor
test:
go test -v -cover ./...
GOFLAGS=-mod=vendor go test -v -cover ./...
run:
go run main.go
GOFLAGS=-mod=vendor go run main.go
freebsd:
mkdir -p _bin
GOOS=freebsd GOARCH=amd64 go build -o _bin/donniemarko-freebsd cmd/main.go
GOOS=freebsd GOARCH=amd64 GOFLAGS=-mod=vendor go build -o _bin/donniemarko-freebsd cmd/main.go
all: build install

View File

@ -14,3 +14,12 @@ Knowledge Management System over markdown notes.
- Rendering the notes in a printable-friendly format, taking advantage of HTML/CSS styling
- Providing an interface to aggregate the content of those notes for quickly retrieving bits of information through searching and filtering
- Providing an interface to cross-reference those notes through a tagging system, in the same fashion as a blog or a wiki
## Development
Vendoring is supported for offline builds.
Common commands:
- `make vendor` to populate `vendor/`
- `make build` to build using vendored deps
- `make test` to run tests using vendored deps