From 0d9b7c4e7bf8c67db303b9100d357a46e88ae9ab Mon Sep 17 00:00:00 2001 From: adminoo Date: Mon, 23 Feb 2026 13:38:19 +0100 Subject: [PATCH] feat: make use of vendoring --- .gitignore | 3 ++- Makefile | 11 +++++++---- README.md | 9 +++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 6a4f2bd..8feed97 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ _bin -.#* \ No newline at end of file +.#* +vendor/ diff --git a/Makefile b/Makefile index a2c2a86..9139bcb 100755 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 739f8ef..7ff309a 100644 --- a/README.md +++ b/README.md @@ -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