feat: add Windows support to build system

- Add make build-windows for Windows AMD64
- Update make build-all to include Windows
- Update release script to package Windows binary as .zip
- Add Windows installation instructions to docs
- Windows binary: qfs-windows-amd64.exe (~17MB)

All platforms now supported:
- Linux AMD64 (.tar.gz)
- macOS Intel/ARM (.tar.gz)
- Windows AMD64 (.zip)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-02-03 11:04:04 +03:00
parent 1bce8086d6
commit e2d056e7cb
4 changed files with 79 additions and 3 deletions

View File

@@ -33,8 +33,14 @@ build-macos:
@echo "✓ Built: bin/$(BINARY)-darwin-amd64"
@echo "✓ Built: bin/$(BINARY)-darwin-arm64"
# Build release for Windows (cross-compile)
build-windows:
@echo "Building $(BINARY) for Windows..."
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="$(LDFLAGS)" -o bin/$(BINARY)-windows-amd64.exe ./cmd/qfs
@echo "✓ Built: bin/$(BINARY)-windows-amd64.exe"
# Build all platforms
build-all: build-release build-linux build-macos
build-all: build-release build-linux build-macos build-windows
# Create release packages for all platforms
release:
@@ -77,6 +83,7 @@ help:
@echo " build-release Build optimized release (default)"
@echo " build-linux Cross-compile for Linux"
@echo " build-macos Cross-compile for macOS (Intel + Apple Silicon)"
@echo " build-windows Cross-compile for Windows"
@echo " build-all Build for all platforms"
@echo " release Create release packages for all platforms"
@echo " version Show current version"

View File

@@ -110,7 +110,8 @@ CGO_ENABLED=0 go build -ldflags="-s -w -X main.Version=$VERSION" -o bin/qfs ./cm
**Makefile команды:**
```bash
make build-release # Оптимизированная сборка с версией
make build-all # Сборка для всех платформ (Linux, macOS)
make build-all # Сборка для всех платформ (Linux, macOS, Windows)
make build-windows # Только для Windows
make run # Запуск dev сервера
make test # Запуск тестов
make clean # Очистка bin/

60
RELEASE_v0.2.6.md Normal file
View File

@@ -0,0 +1,60 @@
## Release v0.2.6 - Build & Release Improvements
Minor release focused on developer experience and release automation.
### Changes
**Build System**
- 🎯 Renamed binary from `quoteforge` to `qfs` (shorter, easier to type)
- 🏷️ Added `-version` flag to display build version
- 📦 Added Makefile with build targets for all platforms
- 🚀 Added automated release script for multi-platform binaries
**New Commands**
```bash
make build-release # Optimized build with version info
make build-all # Build for Linux + macOS (Intel/ARM)
make release # Create release packages with checksums
./bin/qfs -version # Show version
```
**Release Artifacts**
- Linux AMD64
- macOS Intel (AMD64)
- macOS Apple Silicon (ARM64)
- Windows AMD64
- SHA256 checksums
### Installation
Download the appropriate binary for your platform:
```bash
# Linux
wget https://git.mchus.pro/mchus/QuoteForge/releases/download/v0.2.6/qfs-v0.2.6-linux-amd64.tar.gz
tar -xzf qfs-v0.2.6-linux-amd64.tar.gz
chmod +x qfs-linux-amd64
./qfs-linux-amd64
# macOS Intel
curl -L -O https://git.mchus.pro/mchus/QuoteForge/releases/download/v0.2.6/qfs-v0.2.6-darwin-amd64.tar.gz
tar -xzf qfs-v0.2.6-darwin-amd64.tar.gz
chmod +x qfs-darwin-amd64
./qfs-darwin-amd64
# macOS Apple Silicon
curl -L -O https://git.mchus.pro/mchus/QuoteForge/releases/download/v0.2.6/qfs-v0.2.6-darwin-arm64.tar.gz
tar -xzf qfs-v0.2.6-darwin-arm64.tar.gz
chmod +x qfs-darwin-arm64
./qfs-darwin-arm64
# Windows
curl -L -O https://git.mchus.pro/mchus/QuoteForge/releases/download/v0.2.6/qfs-v0.2.6-windows-amd64.zip
unzip qfs-v0.2.6-windows-amd64.zip
qfs-windows-amd64.exe
```
### Breaking Changes
None - fully backward compatible with v0.2.5
### Full Changelog
https://git.mchus.pro/mchus/QuoteForge/compare/v0.2.5...v0.2.6

View File

@@ -57,11 +57,19 @@ if [ -f "bin/qfs-darwin-arm64" ]; then
echo -e "${GREEN} ✓ qfs-${VERSION}-darwin-arm64.tar.gz${NC}"
fi
# Windows AMD64
if [ -f "bin/qfs-windows-amd64.exe" ]; then
cd bin
zip -q "../${RELEASE_DIR}/qfs-${VERSION}-windows-amd64.zip" qfs-windows-amd64.exe
cd ..
echo -e "${GREEN} ✓ qfs-${VERSION}-windows-amd64.zip${NC}"
fi
# Generate checksums
echo ""
echo -e "${YELLOW}→ Generating checksums...${NC}"
cd "${RELEASE_DIR}"
shasum -a 256 *.tar.gz > SHA256SUMS.txt
shasum -a 256 *.tar.gz *.zip > SHA256SUMS.txt 2>/dev/null || shasum -a 256 * | grep -v SHA256SUMS > SHA256SUMS.txt
cd ../..
echo -e "${GREEN} ✓ SHA256SUMS.txt${NC}"