From 401b830b9131e3bb01ffda1c3ba4c45b14feb74c Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Fri, 9 May 2025 16:03:40 -0500 Subject: [PATCH] make: add Makefile --- .gitignore | 1 + Makefile | 18 ++++++++++++++++++ README.md | 10 ++++++++++ 3 files changed, 29 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..54c30c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +./knit diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a96230d --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +BINARY_NAME=knit + +PREFIX ?= /usr/local +BINDIR = $(PREFIX)/bin + +.PHONY: all build install clean + +all: build + +build: + go build -o $(BINARY_NAME) ./cmd/knit + +install: build + mkdir -p $(BINDIR) + cp $(BINARY_NAME) $(BINDIR)/$(BINARY_NAME) + +clean: + rm -f $(BINARY_NAME) diff --git a/README.md b/README.md index ebe65ad..b30e61d 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,18 @@ A CLI for tangled.sh ## Installation +Using go: + `go install tangled.sh/rockorager.dev/knit` +Otherwise, + +``` +git clone https://tangled.sh/rockorager.dev/knit +cd knit +make install +``` + ## Usage `knit` has similar usage patterns as the Github CLI (`gh`). Prior to making any -- 2.51.2