Skip to main content

Development

Build instructions

Prerequisites

Building

# Build sake for your platform target
make build

# Build sake binaries and archives for all platforms using goreleaser
make build-all

# Generate Manpage
make gen-man

Developing

# Format code
make gofmt

# Manage dependencies (download/remove unused)
make tidy

# Lint code
make lint

# Standing in examples directory you can run the following to debug faster
go run ../main.go run ping -a

Releasing

The following workflow is used for releasing a new sake version:

  1. Create pull request with changes
  2. Generate manpage make gen-man
  3. Pass all tests
  4. Run make build-all to verify windows build
  5. Update Makefile and CHANGELOG.md with correct version, and add all changes to CHANGELOG.md
  6. Squash-merge to main with Release vx.y.z and description of changes
  7. Run make release, which will:
  8. Create a git tag with release notes
  9. Trigger a build in Github that builds cross-platform binaries and generates release notes of changes between current and previous tag

Dependency Graph

Create SVG dependency graphs using graphviz and goda.

goda graph "github.com/alajmo/sake/..." | dot -Tsvg -o res/graph.svg
goda graph "github.com/alajmo/sake:all" | dot -Tsvg -o res/graph-full.svg