From c0588e97107b472274fedb9664843b717c8444ca Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Thu, 18 Jun 2026 14:34:12 +0300 Subject: [PATCH] =?UTF-8?q?chore:=20release.sh=20=E2=80=94=20=D1=82=D0=BE?= =?UTF-8?q?=D0=BB=D1=8C=D0=BA=D0=BE=20darwin-arm64=20=D0=B8=20windows-amd6?= =?UTF-8?q?4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- scripts/release.sh | 49 ++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 2212879..7ff3cd8 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -53,45 +53,34 @@ mkdir -p "${RELEASE_DIR}" # Create release notes template only when missing. ensure_release_notes "${RELEASE_DIR}/RELEASE_NOTES.md" -# Build for all platforms +# Build binaries echo -e "${YELLOW}→ Building binaries...${NC}" -make build-all + +LDFLAGS="-s -w -X main.Version=${VERSION}" + +echo "Building qfs for macOS (Apple Silicon)..." +CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="${LDFLAGS}" -o bin/qfs-darwin-arm64 ./cmd/qfs +echo "✓ Built: bin/qfs-darwin-arm64" + +echo "Building qfs for Windows..." +CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="${LDFLAGS}" -o bin/qfs-windows-amd64.exe ./cmd/qfs +echo "✓ Built: bin/qfs-windows-amd64.exe" # Package binaries with checksums echo "" echo -e "${YELLOW}→ Creating release packages...${NC}" -# Linux AMD64 -if [ -f "bin/qfs-linux-amd64" ]; then - cd bin - tar -czf "../${RELEASE_DIR}/qfs-${VERSION}-linux-amd64.tar.gz" qfs-linux-amd64 - cd .. - echo -e "${GREEN} ✓ qfs-${VERSION}-linux-amd64.tar.gz${NC}" -fi - -# macOS Intel -if [ -f "bin/qfs-darwin-amd64" ]; then - cd bin - tar -czf "../${RELEASE_DIR}/qfs-${VERSION}-darwin-amd64.tar.gz" qfs-darwin-amd64 - cd .. - echo -e "${GREEN} ✓ qfs-${VERSION}-darwin-amd64.tar.gz${NC}" -fi - # macOS Apple Silicon -if [ -f "bin/qfs-darwin-arm64" ]; then - cd bin - tar -czf "../${RELEASE_DIR}/qfs-${VERSION}-darwin-arm64.tar.gz" qfs-darwin-arm64 - cd .. - echo -e "${GREEN} ✓ qfs-${VERSION}-darwin-arm64.tar.gz${NC}" -fi +cd bin +tar -czf "../${RELEASE_DIR}/qfs-${VERSION}-darwin-arm64.tar.gz" qfs-darwin-arm64 +cd .. +echo -e "${GREEN} ✓ qfs-${VERSION}-darwin-arm64.tar.gz${NC}" # 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 +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}" # Generate checksums echo ""