feat: add Makefile to build all locally

This commit is contained in:
2026-07-19 22:27:49 +08:00
parent fee5c34218
commit fb4d927220
3 changed files with 76 additions and 24 deletions

View File

@ -17,7 +17,7 @@ A CLI for surfing the internet scientifically, written in Go.
```bash
git clone ssh://git@gitea.epss.net.cn:2223/klesh/ss.git
cd ss
go build -o ssm ./cmd/ssm
make build
```
This produces a single `ssm` (or `ssm.exe` on Windows) binary with no runtime dependencies — templates and hook scripts are embedded in the binary.
@ -124,11 +124,21 @@ ssm service status [--name <name>]
## Development
```bash
go build ./...
go vet ./...
go test ./...
make build # build ssm for the current platform
make test # go test ./...
make vet # go vet ./...
make fmt # check formatting (gofmt -l)
make help # list all targets
```
### Releasing
```bash
make release VERSION=v1.0.0
```
Cross-compiles for linux/amd64, darwin/arm64, and windows/amd64, and packages each into `dist/` as a `.tar.gz`/`.zip` alongside a `checksums.txt`. Pushing a `vX.Y.Z` tag runs the same thing via `.drone.yml` and publishes the artifacts as a Gitea release.
## License
MIT License - see LICENSE file for details.