codesign on Mac

This commit is contained in:
booleanmaybe 2026-03-17 23:50:52 -04:00
parent 9073863422
commit f0765feee3
3 changed files with 14 additions and 5 deletions

View file

@ -22,6 +22,9 @@ builds:
- -X github.com/boolean-maybe/tiki/config.Version={{.Version}} - -X github.com/boolean-maybe/tiki/config.Version={{.Version}}
- -X github.com/boolean-maybe/tiki/config.GitCommit={{.FullCommit}} - -X github.com/boolean-maybe/tiki/config.GitCommit={{.FullCommit}}
- -X github.com/boolean-maybe/tiki/config.BuildDate={{.Date}} - -X github.com/boolean-maybe/tiki/config.BuildDate={{.Date}}
hooks:
post:
- cmd: sh -c '{{ if eq .Os "darwin" }}command -v codesign >/dev/null 2>&1 && codesign -s - {{ .Path }} || true{{ else }}true{{ end }}'
archives: archives:
- id: tiki - id: tiki

View file

@ -21,11 +21,15 @@ help:
build: build:
@echo "Building tiki $(VERSION)..." @echo "Building tiki $(VERSION)..."
go build $(LDFLAGS) -o tiki . go build $(LDFLAGS) -o tiki .
ifeq ($(shell uname),Darwin)
codesign -s - tiki
endif
# Build and install to GOPATH/bin # Build, sign, and install to ~/.local/bin
install: install: build
@echo "Installing tiki $(VERSION)..." @echo "Installing tiki to ~/.local/bin..."
go install $(LDFLAGS) . @mkdir -p ~/.local/bin
cp tiki ~/.local/bin/tiki
# Clean build artifacts # Clean build artifacts
clean: clean:

View file

@ -62,7 +62,9 @@ and simply copy the `tiki` executable to any location and make it available via
### Build from source ### Build from source
```bash ```bash
GOBIN=$HOME/.local/bin go install github.com/boolean-maybe/tiki@latest git clone https://github.com/boolean-maybe/tiki.git
cd tiki
make build install
``` ```
### Verify installation ### Verify installation