feat: add Makefile to build all locally
This commit is contained in:
18
README.md
18
README.md
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user