diff --git a/Makefile b/Makefile index ed8c388..85b3286 100644 --- a/Makefile +++ b/Makefile @@ -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" diff --git a/README.md b/README.md index 5c2238c..1e1dec6 100644 --- a/README.md +++ b/README.md @@ -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/ diff --git a/RELEASE_v0.2.6.md b/RELEASE_v0.2.6.md new file mode 100644 index 0000000..8779b2c --- /dev/null +++ b/RELEASE_v0.2.6.md @@ -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 diff --git a/scripts/release.sh b/scripts/release.sh index 31349bb..6c7d373 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -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}"