Skip to content

Latest commit

 

History

History
106 lines (71 loc) · 2.59 KB

File metadata and controls

106 lines (71 loc) · 2.59 KB

Contributing

Thanks for your interest in improving any-sync-bundle! This document explains how to build, test, and propose changes.

Development Setup

Prerequisites

  • Go 1.26.1 or later
  • Docker (optional, for testing with containers)
  • golangci-lint (for linting)

Build and Test

# Build
go build -o any-sync-bundle .
./any-sync-bundle --version

# Run linter
golangci-lint run --fix

# Run tests
go test -race -shuffle=on -vet=all -failfast ./...

Local Dependencies

For a quick local stack, see compose.dev.yml (MongoDB replica set + Redis Stack):

docker compose -f compose.dev.yml up -d

With Nix

Nix provides reproducible builds and a complete development environment.

nix build
./result/bin/any-sync-bundle --version
nix flake check

Running Locally

  • All-in-one container (bundled MongoDB/Redis): see compose.aio.yml
  • Minimal container (external MongoDB/Redis): see compose.external.yml
  • Binary (no container): use start-bundle and supply your own MongoDB/Redis

Pull Requests

  • Keep PRs small and focused
  • Include a brief description of what changed and why
  • Update README/docs when behavior or flags/env variables change
  • Run linter and tests before submitting

By submitting a PR, you agree that your contribution is licensed under the repository's MIT license.

Release Process

For maintainers releasing a new version.

1. Check locally

goreleaser release --snapshot --clean

2. Update release references

Before tagging, update user-facing release references to the final version:

  • README version section and Docker image examples
  • Compose file image tags
  • Nix package version in flake.nix

Use rg to confirm that the previous release tag no longer appears in release-facing files.

3. Create and push tag

# Set variables (fish shell)
set VERSION v1.4.3
set ANYTYPE_UNIX_TIMESTAMP <current timestamp from https://puppetdoc.anytype.io/api/v1/prod-any-sync-compatible-versions/>
# The compatibility date suffix is always derived in UTC.
set ANYTYPE_FORMATTED (env TZ=UTC date -r $ANYTYPE_UNIX_TIMESTAMP +'%Y-%m-%d')
set FINAL_VERSION $VERSION-$ANYTYPE_FORMATTED

# Create tag and push
git tag -a $FINAL_VERSION -m "Release $FINAL_VERSION"
git push origin tag $FINAL_VERSION

Version Format

v[bundle-version]-[anytype-compatibility-date]


Good luck and have fun!