Skip to content

Commit d54f00e

Browse files
committed
Add --force flag to release script for overwriting existing releases
1 parent 48489e5 commit d54f00e

File tree

6 files changed

+281
-35
lines changed

6 files changed

+281
-35
lines changed

README.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,9 @@ The `release-all-in-one.sh` script automates the entire release workflow:
955955

956956
# Build locally without pushing to GitHub
957957
./scripts/release-all-in-one.sh --no-push
958+
959+
# Re-release existing version (overwrite tag and GitHub release)
960+
./scripts/release-all-in-one.sh --force v2.5.0
958961
```
959962

960963
**What it does:**
@@ -972,14 +975,43 @@ The `release-all-in-one.sh` script automates the entire release workflow:
972975
12. Pushes to GitHub
973976
13. Creates GitHub release with all assets
974977

975-
**Environment Variables:**
976-
- `APPLE_ID`: Apple ID for macOS notarization (optional)
977-
- `APP_SPECIFIC_PASSWORD`: App-specific password for notarization (optional)
978+
**Environment Variables (REQUIRED for releases):**
979+
- `APPLE_ID`: Apple ID for macOS notarization
980+
- `APP_SPECIFIC_PASSWORD`: App-specific password for notarization
981+
982+
⚠️ **Important**: macOS binaries MUST be signed and notarized to work on user systems. The script enforces this requirement and will fail if credentials are not provided. For local testing only, use `--no-push --skip-macos-signing`.
983+
984+
**Setting Up Credentials (One-Time Setup):**
985+
986+
```bash
987+
# Option 1: Use credentials file (Recommended - saves credentials locally)
988+
# File is already created at scripts/release-env.sh and gitignored for security
989+
source scripts/release-env.sh
990+
991+
# Option 2: Set manually each time
992+
export APPLE_ID='your-apple-id@example.com'
993+
export APP_SPECIFIC_PASSWORD='xxxx-xxxx-xxxx-xxxx'
994+
```
995+
996+
**Getting Apple Credentials:**
997+
1. **Apple ID**: Your Apple Developer account email
998+
2. **App-Specific Password**:
999+
- Go to [appleid.apple.com](https://appleid.apple.com)
1000+
- Sign in and navigate to Security section
1001+
- Click "Generate Password" under App-Specific Passwords
1002+
- Copy the generated password (format: xxxx-xxxx-xxxx-xxxx)
1003+
3. **Developer ID Certificate**: Install from Apple Developer account
1004+
- Required for code signing
1005+
- Must be "Developer ID Application" certificate
1006+
1007+
**Security Note**: The `scripts/release-env.sh` file is gitignored and will never be committed to the repository.
9781008

9791009
**Options:**
9801010
- `--dry-run`: Simulate without making changes
9811011
- `--skip-tests`: Skip running tests
9821012
- `--no-push`: Build locally without GitHub operations
1013+
- `--skip-macos-signing`: Skip signing (TESTING ONLY, must use with --no-push)
1014+
- `--force` or `-f`: Force overwrite existing release (deletes tag and GitHub release)
9831015
- `--help`: Show detailed help
9841016

9851017
### Manual Release (Legacy)

docs/MODERNIZATION_NOTES.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,11 @@ Created `scripts/release-all-in-one.sh` that consolidates the entire release wor
9797
- Version file updates (Makefile, config.go)
9898
- Optional test execution
9999
- Complete build pipeline
100-
- macOS signing and notarization
100+
- **Mandatory macOS signing and notarization** (enforced for releases)
101101
- Package creation and checksums
102102
- Git operations (commit, tag, push)
103103
- GitHub release creation and asset upload
104+
- Signature verification before release
104105

105106
**Benefits:**
106107
- Single command for complete release
@@ -111,12 +112,36 @@ Created `scripts/release-all-in-one.sh` that consolidates the entire release wor
111112

112113
**Options:**
113114
```bash
114-
--dry-run # Test without changes
115-
--skip-tests # Skip test execution
116-
--no-push # Local build only
117-
--help # Show usage
115+
--dry-run # Test without changes
116+
--skip-tests # Skip test execution
117+
--no-push # Local build only
118+
--skip-macos-signing # Skip signing (TESTING ONLY, requires --no-push)
119+
--help # Show usage
118120
```
119121

122+
**macOS Code Signing (MANDATORY):**
123+
124+
The release script enforces mandatory code signing and notarization for all macOS binaries:
125+
126+
- **Why Required**: Unsigned binaries won't run on user systems due to macOS Gatekeeper
127+
- **Enforcement**: Script fails if Apple credentials not provided for GitHub releases
128+
- **Verification**: Signatures are verified before creating GitHub release
129+
- **Testing Mode**: Use `--no-push --skip-macos-signing` for local testing only
130+
131+
**Required Environment Variables:**
132+
```bash
133+
export APPLE_ID='your-apple-id@example.com'
134+
export APP_SPECIFIC_PASSWORD='xxxx-xxxx-xxxx-xxxx'
135+
```
136+
137+
The script will:
138+
1. Check for macOS environment
139+
2. Validate Apple credentials
140+
3. Sign binaries with Developer ID Application certificate
141+
4. Submit for notarization (may take several minutes)
142+
5. Verify signatures before proceeding
143+
6. Fail release if any signing step fails
144+
120145
### 5. Code Quality Improvements
121146

122147
#### Tool Description Organization

release/v2.5.0/RELEASE_NOTES.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Slide MCP Server v2.5.0
2+
3+
## Changes
4+
5+
- Various improvements and bug fixes
6+
7+
## Installation
8+
9+
Download the appropriate binary for your platform:
10+
11+
- **Linux x64**: slide-mcp-server-$NEW_VERSION-macos-x64.tar.gz
12+
- **Linux ARM64**: slide-mcp-server-$NEW_VERSION-macos-arm64.tar.gz
13+
- **macOS x64**: slide-mcp-server-$NEW_VERSION-macos-x64.tar.gz (or darwin-amd64.tar.gz)
14+
- **macOS ARM64**: slide-mcp-server-$NEW_VERSION-macos-arm64.tar.gz (or darwin-arm64.tar.gz)
15+
- **Windows x64**: slide-mcp-server-$NEW_VERSION-windows-x64.zip
16+
17+
## Verification
18+
19+
Verify the integrity of your download using the checksums.sha256 file:
20+
21+
```bash
22+
shasum -a 256 -c checksums.sha256
23+
```
24+
25+
## macOS Security
26+
27+
The macOS binaries are signed and notarized by Apple. They should run without security warnings on macOS 10.15+ systems.

release/v2.5.0/checksums.sha256

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
38f56d0b365f238feda98080c9310b85507d9698fdb234b88b62575a558a45b0 ./slide-mcp-server-darwin-amd64.zip
2+
5f864ddd37edb21f954333d4b633f56c454e6381939c4acff0e37a39a59afcbe ./slide-mcp-server-darwin-arm64.zip
3+
8f18eacb8c9411b0ed7c448b0455950e1e2378321f1907000de50ec6ea349105 ./slide-mcp-server-v2.5.0-darwin-amd64.tar.gz
4+
27239f21ca58ee098ea5715e50f261cc54605f06e82b958f502e8da4fa21138e ./slide-mcp-server-v2.5.0-darwin-arm64.tar.gz
5+
946b94efe7e66e801ac9f1c1a735b5eccc9953413aa8d9bcddd9ea567d328fd5 ./slide-mcp-server-v2.5.0-linux-amd64.tar.gz
6+
712f4b821e46504f99884593c8d0e341b5c531c0f4b29db522975b262adbc1fd ./slide-mcp-server-v2.5.0-linux-arm64.tar.gz
7+
26176e17758812fa2de98e542fcc5bd888a7f558bacb5bffc012a9fda9fd13a3 ./slide-mcp-server-v2.5.0-macos-amd64.tar.gz
8+
27239f21ca58ee098ea5715e50f261cc54605f06e82b958f502e8da4fa21138e ./slide-mcp-server-v2.5.0-macos-arm64.tar.gz
9+
5d0ad48d34fdc8e3531eab3177787ddf2399bf6cb62780f5a30f12a8f67cb8d5 ./slide-mcp-server-v2.5.0-windows-x64.zip

scripts/RELEASE_README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,27 @@ This document describes how to use the automated release script for Slide MCP Se
44

55
## Quick Start
66

7-
First, set your Apple credentials as environment variables:
7+
First, set your Apple credentials. **Option 1 (Recommended)**: Use the credentials file:
88

99
```bash
10-
export APPLE_ID='your-apple-id@example.com'
11-
export APP_SPECIFIC_PASSWORD='your-app-specific-password'
10+
# One-time setup (credentials are saved securely and gitignored)
11+
cp scripts/release-env.template scripts/release-env.sh
12+
# Edit scripts/release-env.sh with your actual credentials
13+
nano scripts/release-env.sh # or use your preferred editor
14+
15+
# Then, before each release:
16+
source scripts/release-env.sh
1217
```
1318

14-
Or use the provided template:
19+
**Option 2**: Set environment variables manually each time:
1520

1621
```bash
17-
# Copy and customize the template
18-
cp scripts/release-env.template scripts/release-env.sh
19-
# Edit scripts/release-env.sh with your credentials
20-
# Source the environment
21-
source scripts/release-env.sh
22+
export APPLE_ID='your-apple-id@example.com'
23+
export APP_SPECIFIC_PASSWORD='your-app-specific-password'
2224
```
2325

26+
The credentials file (`scripts/release-env.sh`) is automatically gitignored, so your credentials stay secure on your local machine.
27+
2428
To create a new release with auto-incremented version:
2529

2630
```bash

0 commit comments

Comments
 (0)