-
-
Notifications
You must be signed in to change notification settings - Fork 1
development setup
Cyber Official edited this page May 31, 2026
·
1 revision
- Go 1.24.0 or later
- Git
git clone https://github.com/cyberofficial/CyberPatchMaker.git
cd CyberPatchMaker
go mod downloadgo build -o patch-gen.exe ./cmd/generator
go build -o patch-apply.exe ./cmd/applier
# Cross-compile
GOOS=windows GOARCH=amd64 go build -o patch-gen.exe ./cmd/generator
GOOS=linux GOARCH=amd64 go build -o patch-gen ./cmd/generator
# Optimized (smaller binary)
go build -ldflags="-s -w" -o patch-gen.exe ./cmd/generator.\build.ps1 # build to dist/<version>/
.\build.ps1 -i # bump patch version then build
.\build.ps1 -ii # bump minor version then build
.\build.ps1 -iii # bump major version then build
.\build.ps1 -Clean # clean dist before buildVersion constants are in internal/core/version/version.go.
.\advanced-test.ps1 # 59 standard tests
.\advanced-test.ps1 -run1gbtest # + large patch test
.\advanced-test.ps1 -runlargefile # + chunked processing test
.\advanced-test.ps1 -run1gbtest -runlargefile # all testsTest data is auto-generated on first run. On subsequent runs, previous test data is cleaned up automatically.
cmd/generator/main.go -- CLI patch generator
cmd/applier/main.go -- CLI patch applier
internal/core/ -- business logic (patcher, scanner, manifest, version, cache, config)
pkg/utils/ -- shared types and utilities (types, checksum, fileops, compress, patch_io)
-
User-facing: Add to
cmd/layer -
Business logic: Add to appropriate
internal/core/module -
Shared utility: Add to
pkg/utils/ -
Core types: Update
pkg/utils/types.go
- Create a feature branch:
git checkout -b feature/description - Make changes, run
go fmt ./..., run.\advanced-test.ps1 - Use conventional commits:
feat:,fix:,docs:,test:,refactor:,perf:,chore: - Submit PR against
main
All PRs must pass the test suite. Documentation should be updated for any user-facing changes.