rails_map 1.1.0 β 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.vscode/settings.json +2 -0
- data/AUTHENTICATION.md +10 -6
- data/CHANGELOG.md +57 -23
- data/CODE_OF_CONDUCT.md +129 -0
- data/CONTRIBUTING.md +211 -0
- data/QUICKSTART.md +16 -3
- data/README.md +12 -6
- data/RELEASE_QUICK_REFERENCE.md +114 -0
- data/RELEASE_SCRIPT_GUIDE.md +405 -0
- data/RUBYGEMS_IMPROVEMENTS.md +297 -0
- data/SECURITY.md +162 -0
- data/URL_CHANGE_SUMMARY.md +150 -0
- data/docs/index.html +1564 -1275
- data/lib/generators/rails_map/install_generator.rb +1 -1
- data/lib/generators/rails_map/templates/README +14 -12
- data/lib/rails_map/version.rb +1 -1
- data/release.sh +338 -0
- metadata +46 -6
data/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Rails Map
|
|
2
2
|
|
|
3
|
+
[](https://badge.fury.io/rb/rails_map)
|
|
4
|
+
[](https://rubygems.org/gems/rails_map)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://www.ruby-lang.org)
|
|
7
|
+
[](https://rubyonrails.org)
|
|
8
|
+
|
|
3
9
|
π **[Homepage](https://rails-map.netlify.app)** | π¦ **[RubyGems](https://rubygems.org/gems/rails_map)** | π **[GitHub](https://github.com/ArshdeepGrover/rails-map)**
|
|
4
10
|
|
|
5
11
|
Automatically generates interactive API documentation for Rails by mapping routes, controllers, and models. Zero configurationβjust install and go.
|
|
@@ -47,11 +53,11 @@ RAILS_MAP_PASSWORD=your_secure_password
|
|
|
47
53
|
This automatically:
|
|
48
54
|
|
|
49
55
|
- β
Creates `config/initializers/rails_map.rb` with authentication enabled
|
|
50
|
-
- β
Mounts the engine at `/
|
|
56
|
+
- β
Mounts the engine at `/rails-map`
|
|
51
57
|
- β
Adds `/doc/api` to `.gitignore`
|
|
52
58
|
- β
Uses default credentials (admin/password) if ENV variables not set
|
|
53
59
|
|
|
54
|
-
Start your server and visit `http://localhost:3000/
|
|
60
|
+
Start your server and visit `http://localhost:3000/rails-map` - you'll be prompted to login!
|
|
55
61
|
|
|
56
62
|
### Setup Without Authentication
|
|
57
63
|
|
|
@@ -64,10 +70,10 @@ rails g rails_map:install --skip-auth
|
|
|
64
70
|
This will:
|
|
65
71
|
|
|
66
72
|
- β
Create the configuration file (auth disabled)
|
|
67
|
-
- β
Mount the engine at `/
|
|
73
|
+
- β
Mount the engine at `/rails-map`
|
|
68
74
|
- β
Add `/doc/api` to `.gitignore`
|
|
69
75
|
|
|
70
|
-
Start your server and visit `/
|
|
76
|
+
Start your server and visit `/rails-map` - no login required!
|
|
71
77
|
|
|
72
78
|
## Usage
|
|
73
79
|
|
|
@@ -76,10 +82,10 @@ Start your server and visit `/api-doc` - no login required!
|
|
|
76
82
|
Mount the engine in your `config/routes.rb`:
|
|
77
83
|
|
|
78
84
|
```ruby
|
|
79
|
-
mount RailsMap::Engine, at: '/
|
|
85
|
+
mount RailsMap::Engine, at: '/rails-map'
|
|
80
86
|
```
|
|
81
87
|
|
|
82
|
-
Then visit `http://localhost:3000/
|
|
88
|
+
Then visit `http://localhost:3000/rails-map` in your browser to see live documentation.
|
|
83
89
|
|
|
84
90
|
### Static HTML Generation
|
|
85
91
|
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Release Script Quick Reference
|
|
2
|
+
|
|
3
|
+
## Quick Start
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
./release.sh
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## What It Does
|
|
10
|
+
|
|
11
|
+
1. β
Asks for new version number
|
|
12
|
+
2. β
Updates `lib/rails_map/version.rb`
|
|
13
|
+
3. β
Updates `CHANGELOG.md` (if has `[Unreleased]`)
|
|
14
|
+
4. β
Commits changes (optional)
|
|
15
|
+
5. β
Runs tests
|
|
16
|
+
6. β
Builds gem
|
|
17
|
+
7. β
Pushes to RubyGems
|
|
18
|
+
8. β
Creates git tag (optional)
|
|
19
|
+
9. β
Cleans up
|
|
20
|
+
|
|
21
|
+
## Version Format
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
MAJOR.MINOR.PATCH
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Examples: `1.2.0`, `1.2.1`, `2.0.0`
|
|
28
|
+
|
|
29
|
+
## When to Bump
|
|
30
|
+
|
|
31
|
+
| Type | When | Example |
|
|
32
|
+
| --------- | ---------------------------------- | ------------- |
|
|
33
|
+
| **PATCH** | Bug fixes, security patches | 1.2.0 β 1.2.1 |
|
|
34
|
+
| **MINOR** | New features (backward compatible) | 1.2.0 β 1.3.0 |
|
|
35
|
+
| **MAJOR** | Breaking changes | 1.2.0 β 2.0.0 |
|
|
36
|
+
|
|
37
|
+
## Pre-Release Checklist
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# 1. Update CHANGELOG.md
|
|
41
|
+
vim CHANGELOG.md # Add changes under [Unreleased]
|
|
42
|
+
|
|
43
|
+
# 2. Run tests
|
|
44
|
+
bundle exec rake spec
|
|
45
|
+
|
|
46
|
+
# 3. Commit changes
|
|
47
|
+
git add .
|
|
48
|
+
git commit -m "Prepare for release"
|
|
49
|
+
|
|
50
|
+
# 4. Run release script
|
|
51
|
+
./release.sh
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Prompts You'll See
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Current version: 1.2.0
|
|
58
|
+
Enter the new version number: 1.2.1
|
|
59
|
+
Is this correct? (y/n) y
|
|
60
|
+
Commit version changes? (y/n) y
|
|
61
|
+
Push to remote? (y/n) y
|
|
62
|
+
Continue with tests? (y/n) y
|
|
63
|
+
Push to RubyGems? (y/n) y
|
|
64
|
+
Create git tag? (y/n) y
|
|
65
|
+
Push tag to remote? (y/n) y
|
|
66
|
+
Delete local gem file? (y/n) y
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Common Commands
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Make script executable
|
|
73
|
+
chmod +x release.sh
|
|
74
|
+
|
|
75
|
+
# Run release
|
|
76
|
+
./release.sh
|
|
77
|
+
|
|
78
|
+
# Check RubyGems auth
|
|
79
|
+
gem signin
|
|
80
|
+
|
|
81
|
+
# View gem versions
|
|
82
|
+
gem list rails_map --remote --all
|
|
83
|
+
|
|
84
|
+
# Manual push (if needed)
|
|
85
|
+
gem push rails_map-1.2.1.gem
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Rollback
|
|
89
|
+
|
|
90
|
+
If push fails, script offers rollback:
|
|
91
|
+
|
|
92
|
+
- Reverts version.rb
|
|
93
|
+
- Reverts CHANGELOG.md
|
|
94
|
+
- Undoes git commit
|
|
95
|
+
|
|
96
|
+
## Post-Release
|
|
97
|
+
|
|
98
|
+
1. Verify: https://rubygems.org/gems/rails_map
|
|
99
|
+
2. Test: `gem install rails_map`
|
|
100
|
+
3. Create GitHub release
|
|
101
|
+
4. Announce on social media
|
|
102
|
+
|
|
103
|
+
## Troubleshooting
|
|
104
|
+
|
|
105
|
+
| Problem | Solution |
|
|
106
|
+
| ------------------- | -------------------- |
|
|
107
|
+
| Invalid version | Use X.Y.Z format |
|
|
108
|
+
| Push failed | Run `gem signin` |
|
|
109
|
+
| Tests failed | Fix tests or skip |
|
|
110
|
+
| Not in project root | `cd` to project root |
|
|
111
|
+
|
|
112
|
+
## Full Documentation
|
|
113
|
+
|
|
114
|
+
See `RELEASE_SCRIPT_GUIDE.md` for complete documentation.
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
# Release Script Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The `release.sh` script automates the entire gem release process, including version management, building, and publishing to RubyGems.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
β
**Interactive Version Management** - Prompts for new version number
|
|
10
|
+
β
**Automatic Version Updates** - Updates `lib/rails_map/version.rb`
|
|
11
|
+
β
**CHANGELOG Integration** - Updates CHANGELOG.md automatically
|
|
12
|
+
β
**Git Integration** - Commits and pushes version changes
|
|
13
|
+
β
**Pre-flight Checks** - Validates version format and runs tests
|
|
14
|
+
β
**Rollback Support** - Reverts changes if push fails
|
|
15
|
+
β
**Old Gem Cleanup** - Removes previous gem files
|
|
16
|
+
β
**Git Tagging** - Creates and pushes version tags
|
|
17
|
+
β
**Post-install Summary** - Shows next steps
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### Basic Usage
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
./release.sh
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The script will guide you through the entire process with prompts.
|
|
28
|
+
|
|
29
|
+
### Step-by-Step Process
|
|
30
|
+
|
|
31
|
+
#### 1. Version Input
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Current version: 1.2.0
|
|
35
|
+
|
|
36
|
+
Enter the new version number (e.g., 1.2.0, 1.2.1, 2.0.0):
|
|
37
|
+
Version: 1.2.1
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Version Format:**
|
|
41
|
+
|
|
42
|
+
- Must follow semantic versioning: `MAJOR.MINOR.PATCH`
|
|
43
|
+
- Examples: `1.2.1`, `2.0.0`, `1.3.0`
|
|
44
|
+
|
|
45
|
+
#### 2. Version Confirmation
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Version change: 1.2.0 β 1.2.1
|
|
49
|
+
Is this correct? (y/n)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### 3. Automatic Updates
|
|
53
|
+
|
|
54
|
+
The script automatically updates:
|
|
55
|
+
|
|
56
|
+
- `lib/rails_map/version.rb` - Sets VERSION constant
|
|
57
|
+
- `CHANGELOG.md` - Replaces `[Unreleased]` with `[1.2.1] - 2026-02-12`
|
|
58
|
+
|
|
59
|
+
#### 4. Git Commit (Optional)
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Would you like to commit the version changes?
|
|
63
|
+
Commit version changes? (y/n)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
If yes:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
β Version changes committed
|
|
70
|
+
Push to remote? (y/n)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### 5. Pre-flight Checks
|
|
74
|
+
|
|
75
|
+
- Runs test suite (if available)
|
|
76
|
+
- Validates gemspec
|
|
77
|
+
- Checks for errors
|
|
78
|
+
|
|
79
|
+
#### 6. Build Gem
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Building gem: rails_map-1.2.1.gem...
|
|
83
|
+
β Gem built successfully: rails_map-1.2.1.gem
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
#### 7. Final Confirmation
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
90
|
+
READY TO PUSH TO RUBYGEMS
|
|
91
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
92
|
+
Gem: rails_map
|
|
93
|
+
Version: 1.2.1
|
|
94
|
+
File: rails_map-1.2.1.gem
|
|
95
|
+
Size: 45K
|
|
96
|
+
|
|
97
|
+
This will publish the gem to RubyGems.org
|
|
98
|
+
Are you sure you want to continue? (y/n)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### 8. Push to RubyGems
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Pushing gem to RubyGems...
|
|
105
|
+
β Gem pushed successfully to RubyGems!
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### 9. Git Tag (Optional)
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Git tag: v1.2.1
|
|
112
|
+
Create and push git tag? (y/n)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### 10. Cleanup
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
Local gem file: rails_map-1.2.1.gem
|
|
119
|
+
Delete local gem file? (y/n)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Rollback Feature
|
|
123
|
+
|
|
124
|
+
If the push to RubyGems fails, the script offers to rollback:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
β Failed to push gem to RubyGems
|
|
128
|
+
|
|
129
|
+
Would you like to rollback the version changes?
|
|
130
|
+
Rollback to version 1.2.0? (y/n)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
If you choose yes, it will:
|
|
134
|
+
|
|
135
|
+
1. Revert `lib/rails_map/version.rb` to previous version
|
|
136
|
+
2. Revert `CHANGELOG.md` to `[Unreleased]`
|
|
137
|
+
3. Undo the git commit (if made)
|
|
138
|
+
|
|
139
|
+
## Version Numbering Guide
|
|
140
|
+
|
|
141
|
+
Follow [Semantic Versioning](https://semver.org/):
|
|
142
|
+
|
|
143
|
+
### MAJOR version (X.0.0)
|
|
144
|
+
|
|
145
|
+
Increment when you make incompatible API changes
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
1.2.0 β 2.0.0
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Examples:**
|
|
152
|
+
|
|
153
|
+
- Removing public methods
|
|
154
|
+
- Changing method signatures
|
|
155
|
+
- Removing configuration options
|
|
156
|
+
- Breaking backward compatibility
|
|
157
|
+
|
|
158
|
+
### MINOR version (x.Y.0)
|
|
159
|
+
|
|
160
|
+
Increment when you add functionality in a backward compatible manner
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
1.2.0 β 1.3.0
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Examples:**
|
|
167
|
+
|
|
168
|
+
- Adding new features
|
|
169
|
+
- Adding new configuration options
|
|
170
|
+
- Adding new methods
|
|
171
|
+
- Deprecating features (but not removing)
|
|
172
|
+
|
|
173
|
+
### PATCH version (x.y.Z)
|
|
174
|
+
|
|
175
|
+
Increment when you make backward compatible bug fixes
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
1.2.0 β 1.2.1
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Examples:**
|
|
182
|
+
|
|
183
|
+
- Bug fixes
|
|
184
|
+
- Security patches
|
|
185
|
+
- Documentation updates
|
|
186
|
+
- Performance improvements
|
|
187
|
+
|
|
188
|
+
## Pre-Release Checklist
|
|
189
|
+
|
|
190
|
+
Before running the script:
|
|
191
|
+
|
|
192
|
+
- [ ] All changes committed to git
|
|
193
|
+
- [ ] Tests passing locally
|
|
194
|
+
- [ ] CHANGELOG.md updated with changes (under `[Unreleased]`)
|
|
195
|
+
- [ ] Documentation updated
|
|
196
|
+
- [ ] Breaking changes documented
|
|
197
|
+
- [ ] Migration guide written (if needed)
|
|
198
|
+
- [ ] RubyGems credentials configured
|
|
199
|
+
|
|
200
|
+
## RubyGems Authentication
|
|
201
|
+
|
|
202
|
+
Ensure you're authenticated with RubyGems:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# First time setup
|
|
206
|
+
gem signin
|
|
207
|
+
|
|
208
|
+
# Or set API key
|
|
209
|
+
gem signin --key rubygems
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Troubleshooting
|
|
213
|
+
|
|
214
|
+
### "Invalid version format"
|
|
215
|
+
|
|
216
|
+
**Problem:** Version doesn't match semantic versioning
|
|
217
|
+
**Solution:** Use format `X.Y.Z` (e.g., `1.2.1`)
|
|
218
|
+
|
|
219
|
+
### "Failed to push gem to RubyGems"
|
|
220
|
+
|
|
221
|
+
**Possible causes:**
|
|
222
|
+
|
|
223
|
+
1. Not authenticated with RubyGems
|
|
224
|
+
2. Version already exists
|
|
225
|
+
3. Network issues
|
|
226
|
+
4. Insufficient permissions
|
|
227
|
+
|
|
228
|
+
**Solutions:**
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Check authentication
|
|
232
|
+
gem signin
|
|
233
|
+
|
|
234
|
+
# Check existing versions
|
|
235
|
+
gem list rails_map --remote --all
|
|
236
|
+
|
|
237
|
+
# Try manual push
|
|
238
|
+
gem push rails_map-1.2.1.gem
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### "Tests failed"
|
|
242
|
+
|
|
243
|
+
**Problem:** Test suite not passing
|
|
244
|
+
**Solution:** Fix tests before releasing, or skip with 'y' when prompted
|
|
245
|
+
|
|
246
|
+
### "Can't find version.rb"
|
|
247
|
+
|
|
248
|
+
**Problem:** Script not run from project root
|
|
249
|
+
**Solution:** Run from project root directory:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
cd /path/to/rails-map
|
|
253
|
+
./release.sh
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Manual Release (Without Script)
|
|
257
|
+
|
|
258
|
+
If you need to release manually:
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# 1. Update version
|
|
262
|
+
vim lib/rails_map/version.rb
|
|
263
|
+
|
|
264
|
+
# 2. Update CHANGELOG
|
|
265
|
+
vim CHANGELOG.md
|
|
266
|
+
|
|
267
|
+
# 3. Commit changes
|
|
268
|
+
git add lib/rails_map/version.rb CHANGELOG.md
|
|
269
|
+
git commit -m "Bump version to 1.2.1"
|
|
270
|
+
git push
|
|
271
|
+
|
|
272
|
+
# 4. Build gem
|
|
273
|
+
gem build rails_map.gemspec
|
|
274
|
+
|
|
275
|
+
# 5. Push to RubyGems
|
|
276
|
+
gem push rails_map-1.2.1.gem
|
|
277
|
+
|
|
278
|
+
# 6. Create tag
|
|
279
|
+
git tag -a v1.2.1 -m "Release version 1.2.1"
|
|
280
|
+
git push origin v1.2.1
|
|
281
|
+
|
|
282
|
+
# 7. Create GitHub release
|
|
283
|
+
# Go to: https://github.com/ArshdeepGrover/rails-map/releases/new
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Post-Release Tasks
|
|
287
|
+
|
|
288
|
+
After successful release:
|
|
289
|
+
|
|
290
|
+
1. **Verify on RubyGems**
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
https://rubygems.org/gems/rails_map
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
2. **Test installation**
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
gem install rails_map
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
3. **Create GitHub Release**
|
|
303
|
+
- Go to: https://github.com/ArshdeepGrover/rails-map/releases/new
|
|
304
|
+
- Tag: v1.2.1
|
|
305
|
+
- Title: RailsMap v1.2.1
|
|
306
|
+
- Description: Copy from CHANGELOG.md
|
|
307
|
+
|
|
308
|
+
4. **Announce Release**
|
|
309
|
+
- Twitter/X
|
|
310
|
+
- Reddit (r/rails, r/ruby)
|
|
311
|
+
- Dev.to
|
|
312
|
+
- Ruby Weekly
|
|
313
|
+
|
|
314
|
+
5. **Update Documentation**
|
|
315
|
+
- Homepage
|
|
316
|
+
- Wiki
|
|
317
|
+
- README (if needed)
|
|
318
|
+
|
|
319
|
+
## Script Customization
|
|
320
|
+
|
|
321
|
+
### Change Default Behavior
|
|
322
|
+
|
|
323
|
+
Edit `release.sh` to customize:
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
# Skip tests automatically
|
|
327
|
+
# Comment out the test section
|
|
328
|
+
|
|
329
|
+
# Auto-commit without asking
|
|
330
|
+
# Change the commit prompt section
|
|
331
|
+
|
|
332
|
+
# Skip git tagging
|
|
333
|
+
# Comment out the tagging section
|
|
334
|
+
|
|
335
|
+
# Keep gem file by default
|
|
336
|
+
# Change the cleanup section
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## Safety Features
|
|
340
|
+
|
|
341
|
+
The script includes several safety features:
|
|
342
|
+
|
|
343
|
+
1. **Version Validation** - Ensures proper semantic versioning
|
|
344
|
+
2. **Confirmation Prompts** - Multiple confirmations before pushing
|
|
345
|
+
3. **Rollback Support** - Can undo changes if push fails
|
|
346
|
+
4. **Pre-flight Checks** - Validates before building
|
|
347
|
+
5. **Error Handling** - Exits gracefully on errors
|
|
348
|
+
|
|
349
|
+
## Examples
|
|
350
|
+
|
|
351
|
+
### Patch Release (Bug Fix)
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
./release.sh
|
|
355
|
+
# Enter: 1.2.1
|
|
356
|
+
# Commit: y
|
|
357
|
+
# Push: y
|
|
358
|
+
# Continue: y
|
|
359
|
+
# Tag: y
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Minor Release (New Feature)
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
./release.sh
|
|
366
|
+
# Enter: 1.3.0
|
|
367
|
+
# Commit: y
|
|
368
|
+
# Push: y
|
|
369
|
+
# Continue: y
|
|
370
|
+
# Tag: y
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### Major Release (Breaking Changes)
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
./release.sh
|
|
377
|
+
# Enter: 2.0.0
|
|
378
|
+
# Commit: y
|
|
379
|
+
# Push: y
|
|
380
|
+
# Continue: y
|
|
381
|
+
# Tag: y
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
## Best Practices
|
|
385
|
+
|
|
386
|
+
1. **Always update CHANGELOG.md first** - Add changes under `[Unreleased]`
|
|
387
|
+
2. **Run tests locally** - Ensure everything works
|
|
388
|
+
3. **Review changes** - Double-check what's being released
|
|
389
|
+
4. **Use semantic versioning** - Follow the guidelines
|
|
390
|
+
5. **Create GitHub releases** - Document each release
|
|
391
|
+
6. **Announce releases** - Let the community know
|
|
392
|
+
7. **Monitor issues** - Watch for problems after release
|
|
393
|
+
|
|
394
|
+
## Support
|
|
395
|
+
|
|
396
|
+
If you encounter issues with the release script:
|
|
397
|
+
|
|
398
|
+
1. Check this guide
|
|
399
|
+
2. Review error messages
|
|
400
|
+
3. Try manual release process
|
|
401
|
+
4. Open an issue on GitHub
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
**Happy Releasing! π**
|