fips-agents-cli 0.1.1__tar.gz → 0.1.2__tar.gz
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.
- fips_agents_cli-0.1.2/.claude/commands/create-release.md +75 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/CLAUDE.md +53 -5
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/LICENSE +2 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/PKG-INFO +26 -5
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/README.md +25 -4
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/pyproject.toml +1 -1
- fips_agents_cli-0.1.2/scripts/README.md +89 -0
- fips_agents_cli-0.1.2/scripts/release.sh +127 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/version.py +1 -1
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/.github/workflows/test.yml +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/.github/workflows/workflow.yaml +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/.gitignore +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/GENERATOR_IMPLEMENTATION_PLAN.md +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/IMPLEMENTATION_SUMMARY.md +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/Ignite-CLI-Architecture-Analysis.md +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/MVP-PLAN.md +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/PLAN.md +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/PUBLISHING.md +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/QUICK_START_PUBLISHING.md +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/RELEASE_CHECKLIST.md +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/__init__.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/__main__.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/cli.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/commands/__init__.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/commands/create.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/commands/generate.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/tools/__init__.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/tools/filesystem.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/tools/generators.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/tools/git.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/tools/project.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/src/fips_agents_cli/tools/validation.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/tests/__init__.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/tests/conftest.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/tests/test_create.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/tests/test_filesystem.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/tests/test_generate.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/tests/test_generators.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/tests/test_project.py +0 -0
- {fips_agents_cli-0.1.1 → fips_agents_cli-0.1.2}/tests/test_validation.py +0 -0
@@ -0,0 +1,75 @@
|
|
1
|
+
---
|
2
|
+
description: Prepare and publish a new release version
|
3
|
+
tags: [release, publish, version]
|
4
|
+
---
|
5
|
+
|
6
|
+
You are assisting with creating a new release for the fips-agents-cli project.
|
7
|
+
|
8
|
+
## Your Task
|
9
|
+
|
10
|
+
1. **Ask the user for release information:**
|
11
|
+
- New version number (format: x.y.z, e.g., 0.1.2)
|
12
|
+
- Release notes/description of changes
|
13
|
+
|
14
|
+
2. **Update the README.md changelog:**
|
15
|
+
- Read the current README.md file
|
16
|
+
- Add a new version section under the `## Changelog` heading
|
17
|
+
- Format as:
|
18
|
+
```markdown
|
19
|
+
### Version X.Y.Z
|
20
|
+
|
21
|
+
- Feature/Fix: Description of change
|
22
|
+
- Feature/Fix: Description of change
|
23
|
+
```
|
24
|
+
- Place the new version ABOVE older versions (newest first)
|
25
|
+
- Use the release notes provided by the user to populate the changelog
|
26
|
+
|
27
|
+
3. **Run the release script:**
|
28
|
+
- After updating the changelog, run the release script:
|
29
|
+
```bash
|
30
|
+
./scripts/release.sh <version> "<commit-message>"
|
31
|
+
```
|
32
|
+
- The commit message should be a concise summary of the release (e.g., "Add generator commands")
|
33
|
+
|
34
|
+
## Important Notes
|
35
|
+
|
36
|
+
- The release script will:
|
37
|
+
- Update version in `version.py` and `pyproject.toml`
|
38
|
+
- Commit all changes (including the changelog you updated)
|
39
|
+
- Create and push a git tag
|
40
|
+
- Trigger automated GitHub Actions for PyPI publishing
|
41
|
+
|
42
|
+
- Version format must be x.y.z (three numbers separated by dots)
|
43
|
+
- Follow semantic versioning:
|
44
|
+
- Major (1.0.0): Breaking changes
|
45
|
+
- Minor (0.1.0): New features, backward compatible
|
46
|
+
- Patch (0.1.1): Bug fixes, backward compatible
|
47
|
+
|
48
|
+
- The changelog should be clear and user-focused
|
49
|
+
- Group related changes together
|
50
|
+
- Use consistent formatting
|
51
|
+
|
52
|
+
## Example Interaction
|
53
|
+
|
54
|
+
User: "I want to release version 0.1.2"
|
55
|
+
|
56
|
+
You should:
|
57
|
+
1. Ask: "What changes are included in version 0.1.2? Please describe the new features, fixes, or improvements."
|
58
|
+
2. User provides: "Added support for middleware generation, fixed bug in tool validation, improved error messages"
|
59
|
+
3. You update README.md changelog:
|
60
|
+
```markdown
|
61
|
+
### Version 0.1.2
|
62
|
+
|
63
|
+
- Feature: Added support for middleware generation
|
64
|
+
- Fix: Fixed bug in tool validation
|
65
|
+
- Improvement: Improved error messages
|
66
|
+
```
|
67
|
+
4. You run: `./scripts/release.sh 0.1.2 "Add middleware generation support"`
|
68
|
+
5. Confirm success and provide links to monitor the release
|
69
|
+
|
70
|
+
## Validation
|
71
|
+
|
72
|
+
Before running the script, verify:
|
73
|
+
- Version number is in correct format (x.y.z)
|
74
|
+
- Changelog is properly formatted
|
75
|
+
- User has confirmed the changes are ready to release
|
@@ -64,6 +64,49 @@ pip install -e .
|
|
64
64
|
fips-agents --version
|
65
65
|
```
|
66
66
|
|
67
|
+
### Creating a Release
|
68
|
+
|
69
|
+
**Automated Method (Recommended):**
|
70
|
+
|
71
|
+
Use the `/create-release` slash command in Claude Code:
|
72
|
+
|
73
|
+
```
|
74
|
+
/create-release
|
75
|
+
```
|
76
|
+
|
77
|
+
This command will:
|
78
|
+
1. Ask for version number and release notes
|
79
|
+
2. Update the changelog in README.md
|
80
|
+
3. Run `scripts/release.sh` to:
|
81
|
+
- Update version in `version.py` and `pyproject.toml`
|
82
|
+
- Commit and push changes
|
83
|
+
- Create and push git tag
|
84
|
+
- Trigger GitHub Actions for automated PyPI publishing
|
85
|
+
|
86
|
+
**Manual Method:**
|
87
|
+
|
88
|
+
**IMPORTANT**: Version numbers must be updated in TWO places:
|
89
|
+
1. `src/fips_agents_cli/version.py`
|
90
|
+
2. `pyproject.toml`
|
91
|
+
|
92
|
+
```bash
|
93
|
+
# 1. Update version in both files manually or use the script:
|
94
|
+
./scripts/release.sh <version> "<commit-message>"
|
95
|
+
|
96
|
+
# Example:
|
97
|
+
./scripts/release.sh 0.1.2 "Add new generator features"
|
98
|
+
|
99
|
+
# The script handles:
|
100
|
+
# - Updating version.py and pyproject.toml
|
101
|
+
# - Committing changes (including README.md changelog)
|
102
|
+
# - Creating and pushing tag
|
103
|
+
# - Triggering GitHub Actions
|
104
|
+
```
|
105
|
+
|
106
|
+
**Note**: Always update the changelog in README.md before running the script.
|
107
|
+
|
108
|
+
See `RELEASE_CHECKLIST.md` for detailed release procedures and troubleshooting.
|
109
|
+
|
67
110
|
## Architecture
|
68
111
|
|
69
112
|
### Module Structure
|
@@ -148,24 +191,29 @@ def test_something(temp_dir):
|
|
148
191
|
### pyproject.toml
|
149
192
|
|
150
193
|
- **Build System**: Uses Hatchling (not Poetry or setuptools)
|
151
|
-
- **Python Version**: Requires ≥3.
|
194
|
+
- **Python Version**: Requires ≥3.10, supports 3.10-3.12 (dropped 3.9 in v0.1.1)
|
152
195
|
- **Line Length**: Black and Ruff both configured for 100 characters
|
153
196
|
- **Entry Point**: `fips-agents = "fips_agents_cli.cli:main"`
|
154
197
|
- **Test Configuration**: pytest runs with coverage by default
|
198
|
+
- **Version Management**: Version number must match `src/fips_agents_cli/version.py`
|
155
199
|
|
156
200
|
### CI/CD Workflows
|
157
201
|
|
158
202
|
**test.yml**: Runs on push/PR to main
|
159
|
-
- Matrix testing across Python 3.
|
203
|
+
- Matrix testing across Python 3.10, 3.11, 3.12 (dropped 3.9 support in v0.1.1)
|
160
204
|
- Runs pytest with coverage
|
161
205
|
- Checks Black formatting
|
162
206
|
- Runs Ruff linting
|
163
207
|
- Builds distribution and validates with twine
|
164
208
|
|
165
|
-
**workflow.yaml**:
|
166
|
-
-
|
209
|
+
**workflow.yaml**: Automated release and PyPI publishing (triggered by version tags)
|
210
|
+
- Triggers on `v*.*.*` tags (e.g., `v0.1.1`)
|
211
|
+
- Verifies tag version matches both `version.py` and `pyproject.toml`
|
212
|
+
- Extracts changelog from README.md
|
213
|
+
- Creates GitHub Release automatically
|
167
214
|
- Builds wheels and source distributions
|
168
|
-
-
|
215
|
+
- Publishes to PyPI using trusted publishing (no API key needed)
|
216
|
+
- **Important**: This single workflow handles the complete release process - DO NOT create separate release workflows
|
169
217
|
|
170
218
|
## Common Development Patterns
|
171
219
|
|
@@ -2,6 +2,8 @@ MIT License
|
|
2
2
|
|
3
3
|
Copyright (c) 2025 Wes Jackson
|
4
4
|
|
5
|
+
Note: Some code in this project was written with AI.
|
6
|
+
|
5
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
8
|
of this software and associated documentation files (the "Software"), to deal
|
7
9
|
in the Software without restriction, including without limitation the rights
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fips-agents-cli
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: CLI tool for creating and managing FIPS-compliant AI agent projects
|
5
5
|
Project-URL: Homepage, https://github.com/rdwj/fips-agents-cli
|
6
6
|
Project-URL: Repository, https://github.com/rdwj/fips-agents-cli
|
@@ -47,19 +47,31 @@ A command-line tool for creating and managing FIPS-compliant AI agent projects,
|
|
47
47
|
|
48
48
|
## Installation
|
49
49
|
|
50
|
-
|
50
|
+
**Recommended:** Install with [pipx](https://pipx.pypa.io/) for isolated command-line tools:
|
51
51
|
|
52
52
|
```bash
|
53
53
|
pipx install fips-agents-cli
|
54
54
|
```
|
55
55
|
|
56
|
-
|
56
|
+
pipx installs the CLI in an isolated environment while making it globally available. This prevents dependency conflicts with other Python packages.
|
57
|
+
|
58
|
+
<details>
|
59
|
+
<summary><b>Alternative: Using pip</b></summary>
|
60
|
+
|
61
|
+
If you prefer pip or don't have pipx installed:
|
57
62
|
|
58
63
|
```bash
|
59
64
|
pip install fips-agents-cli
|
60
65
|
```
|
61
66
|
|
62
|
-
|
67
|
+
**Note:** Consider using a virtual environment to avoid dependency conflicts.
|
68
|
+
|
69
|
+
</details>
|
70
|
+
|
71
|
+
<details>
|
72
|
+
<summary><b>Alternative: Install from source (for development)</b></summary>
|
73
|
+
|
74
|
+
For contributing or local development:
|
63
75
|
|
64
76
|
```bash
|
65
77
|
# Clone the repository
|
@@ -74,6 +86,8 @@ source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
74
86
|
pip install -e .[dev]
|
75
87
|
```
|
76
88
|
|
89
|
+
</details>
|
90
|
+
|
77
91
|
## Quick Start
|
78
92
|
|
79
93
|
### Create a new MCP server project
|
@@ -514,7 +528,14 @@ MIT License - see LICENSE file for details
|
|
514
528
|
|
515
529
|
## Changelog
|
516
530
|
|
517
|
-
### Version 0.1.
|
531
|
+
### Version 0.1.2
|
532
|
+
|
533
|
+
- Documentation: Updated documentation and improved release management guidance
|
534
|
+
- Automation: Added `/create-release` slash command for automated release workflow
|
535
|
+
- Automation: Created `scripts/release.sh` for streamlined version management and tagging
|
536
|
+
- Documentation: Added `RELEASE_CHECKLIST.md` with comprehensive release procedures
|
537
|
+
|
538
|
+
### Version 0.1.1
|
518
539
|
|
519
540
|
- Added `fips-agents generate` command group
|
520
541
|
- Component generation: tools, resources, prompts, middleware
|
@@ -14,19 +14,31 @@ A command-line tool for creating and managing FIPS-compliant AI agent projects,
|
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
17
|
-
|
17
|
+
**Recommended:** Install with [pipx](https://pipx.pypa.io/) for isolated command-line tools:
|
18
18
|
|
19
19
|
```bash
|
20
20
|
pipx install fips-agents-cli
|
21
21
|
```
|
22
22
|
|
23
|
-
|
23
|
+
pipx installs the CLI in an isolated environment while making it globally available. This prevents dependency conflicts with other Python packages.
|
24
|
+
|
25
|
+
<details>
|
26
|
+
<summary><b>Alternative: Using pip</b></summary>
|
27
|
+
|
28
|
+
If you prefer pip or don't have pipx installed:
|
24
29
|
|
25
30
|
```bash
|
26
31
|
pip install fips-agents-cli
|
27
32
|
```
|
28
33
|
|
29
|
-
|
34
|
+
**Note:** Consider using a virtual environment to avoid dependency conflicts.
|
35
|
+
|
36
|
+
</details>
|
37
|
+
|
38
|
+
<details>
|
39
|
+
<summary><b>Alternative: Install from source (for development)</b></summary>
|
40
|
+
|
41
|
+
For contributing or local development:
|
30
42
|
|
31
43
|
```bash
|
32
44
|
# Clone the repository
|
@@ -41,6 +53,8 @@ source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
41
53
|
pip install -e .[dev]
|
42
54
|
```
|
43
55
|
|
56
|
+
</details>
|
57
|
+
|
44
58
|
## Quick Start
|
45
59
|
|
46
60
|
### Create a new MCP server project
|
@@ -481,7 +495,14 @@ MIT License - see LICENSE file for details
|
|
481
495
|
|
482
496
|
## Changelog
|
483
497
|
|
484
|
-
### Version 0.1.
|
498
|
+
### Version 0.1.2
|
499
|
+
|
500
|
+
- Documentation: Updated documentation and improved release management guidance
|
501
|
+
- Automation: Added `/create-release` slash command for automated release workflow
|
502
|
+
- Automation: Created `scripts/release.sh` for streamlined version management and tagging
|
503
|
+
- Documentation: Added `RELEASE_CHECKLIST.md` with comprehensive release procedures
|
504
|
+
|
505
|
+
### Version 0.1.1
|
485
506
|
|
486
507
|
- Added `fips-agents generate` command group
|
487
508
|
- Component generation: tools, resources, prompts, middleware
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# Release Scripts
|
2
|
+
|
3
|
+
This directory contains automation scripts for the fips-agents-cli project.
|
4
|
+
|
5
|
+
## release.sh
|
6
|
+
|
7
|
+
Automated release script that handles version bumping, tagging, and triggering the release pipeline.
|
8
|
+
|
9
|
+
### Usage
|
10
|
+
|
11
|
+
```bash
|
12
|
+
./scripts/release.sh <version> "<commit-message>"
|
13
|
+
```
|
14
|
+
|
15
|
+
### Arguments
|
16
|
+
|
17
|
+
- `version`: Version number in format x.y.z (e.g., 0.1.2)
|
18
|
+
- `commit-message`: Short description of the release changes
|
19
|
+
|
20
|
+
### Example
|
21
|
+
|
22
|
+
```bash
|
23
|
+
./scripts/release.sh 0.1.2 "Add middleware generation support"
|
24
|
+
```
|
25
|
+
|
26
|
+
### What It Does
|
27
|
+
|
28
|
+
1. **Validates** version format and checks for uncommitted changes
|
29
|
+
2. **Updates** version numbers in:
|
30
|
+
- `src/fips_agents_cli/version.py`
|
31
|
+
- `pyproject.toml`
|
32
|
+
3. **Verifies** both files have matching versions
|
33
|
+
4. **Commits** changes including README.md (changelog)
|
34
|
+
5. **Pushes** to main branch
|
35
|
+
6. **Creates** and pushes version tag (e.g., `v0.1.2`)
|
36
|
+
7. **Triggers** GitHub Actions workflow for:
|
37
|
+
- Creating GitHub Release
|
38
|
+
- Building distribution packages
|
39
|
+
- Publishing to PyPI
|
40
|
+
|
41
|
+
### Prerequisites
|
42
|
+
|
43
|
+
- Must be run from project root directory
|
44
|
+
- Working directory should be clean (no uncommitted changes except version files)
|
45
|
+
- Git remote configured for push access
|
46
|
+
- PyPI Trusted Publishing configured on GitHub
|
47
|
+
|
48
|
+
### Recommended Usage
|
49
|
+
|
50
|
+
Use the `/create-release` slash command in Claude Code, which will:
|
51
|
+
1. Ask for version and release notes
|
52
|
+
2. Update changelog in README.md
|
53
|
+
3. Call this script automatically
|
54
|
+
|
55
|
+
### Manual Usage
|
56
|
+
|
57
|
+
If you prefer to run manually:
|
58
|
+
|
59
|
+
```bash
|
60
|
+
# 1. Update changelog in README.md first
|
61
|
+
# 2. Run the script
|
62
|
+
./scripts/release.sh 0.1.2 "Brief description of changes"
|
63
|
+
# 3. Monitor GitHub Actions
|
64
|
+
```
|
65
|
+
|
66
|
+
### Error Handling
|
67
|
+
|
68
|
+
The script will exit with an error if:
|
69
|
+
- Version format is invalid
|
70
|
+
- Not run from project root
|
71
|
+
- Uncommitted changes exist (excluding version files and README)
|
72
|
+
- Version verification fails
|
73
|
+
- Git operations fail
|
74
|
+
|
75
|
+
### Success Output
|
76
|
+
|
77
|
+
On success, you'll see:
|
78
|
+
- Green checkmarks for each step
|
79
|
+
- Links to monitor GitHub Actions
|
80
|
+
- Link to view the release
|
81
|
+
|
82
|
+
### Monitoring
|
83
|
+
|
84
|
+
After running the script, monitor:
|
85
|
+
- GitHub Actions: https://github.com/rdwj/fips-agents-cli/actions
|
86
|
+
- Releases: https://github.com/rdwj/fips-agents-cli/releases
|
87
|
+
- PyPI: https://pypi.org/project/fips-agents-cli/
|
88
|
+
|
89
|
+
The entire release process typically takes 1-2 minutes.
|
@@ -0,0 +1,127 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
#
|
3
|
+
# release.sh - Automated release script for fips-agents-cli
|
4
|
+
#
|
5
|
+
# Usage: ./scripts/release.sh <version> <commit-message>
|
6
|
+
#
|
7
|
+
# Example: ./scripts/release.sh 0.1.2 "Add new feature for X"
|
8
|
+
#
|
9
|
+
|
10
|
+
set -e # Exit on error
|
11
|
+
|
12
|
+
# Colors for output
|
13
|
+
RED='\033[0;31m'
|
14
|
+
GREEN='\033[0;32m'
|
15
|
+
YELLOW='\033[1;33m'
|
16
|
+
NC='\033[0m' # No Color
|
17
|
+
|
18
|
+
# Function to print colored output
|
19
|
+
print_success() {
|
20
|
+
echo -e "${GREEN}✓${NC} $1"
|
21
|
+
}
|
22
|
+
|
23
|
+
print_error() {
|
24
|
+
echo -e "${RED}✗${NC} $1"
|
25
|
+
}
|
26
|
+
|
27
|
+
print_info() {
|
28
|
+
echo -e "${YELLOW}ℹ${NC} $1"
|
29
|
+
}
|
30
|
+
|
31
|
+
# Check arguments
|
32
|
+
if [ $# -ne 2 ]; then
|
33
|
+
print_error "Usage: $0 <version> <commit-message>"
|
34
|
+
echo "Example: $0 0.1.2 \"Add new feature for X\""
|
35
|
+
exit 1
|
36
|
+
fi
|
37
|
+
|
38
|
+
VERSION=$1
|
39
|
+
COMMIT_MSG=$2
|
40
|
+
|
41
|
+
# Validate version format (x.y.z)
|
42
|
+
if ! [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
43
|
+
print_error "Invalid version format: $VERSION"
|
44
|
+
echo "Version must be in format: x.y.z (e.g., 0.1.2)"
|
45
|
+
exit 1
|
46
|
+
fi
|
47
|
+
|
48
|
+
print_info "Preparing release v$VERSION"
|
49
|
+
echo
|
50
|
+
|
51
|
+
# Check if we're in the project root
|
52
|
+
if [ ! -f "pyproject.toml" ] || [ ! -f "src/fips_agents_cli/version.py" ]; then
|
53
|
+
print_error "Must run from project root directory"
|
54
|
+
exit 1
|
55
|
+
fi
|
56
|
+
|
57
|
+
# Check for uncommitted changes (excluding the files we'll modify)
|
58
|
+
if ! git diff --quiet --exit-code -- ':!src/fips_agents_cli/version.py' ':!pyproject.toml' ':!README.md'; then
|
59
|
+
print_error "You have uncommitted changes. Please commit or stash them first."
|
60
|
+
git status --short
|
61
|
+
exit 1
|
62
|
+
fi
|
63
|
+
|
64
|
+
# 1. Update version.py
|
65
|
+
print_info "Updating src/fips_agents_cli/version.py to $VERSION"
|
66
|
+
sed -i.bak "s/^__version__ = .*/__version__ = \"$VERSION\"/" src/fips_agents_cli/version.py
|
67
|
+
rm -f src/fips_agents_cli/version.py.bak
|
68
|
+
print_success "Updated version.py"
|
69
|
+
|
70
|
+
# 2. Update pyproject.toml
|
71
|
+
print_info "Updating pyproject.toml to $VERSION"
|
72
|
+
sed -i.bak "s/^version = .*/version = \"$VERSION\"/" pyproject.toml
|
73
|
+
rm -f pyproject.toml.bak
|
74
|
+
print_success "Updated pyproject.toml"
|
75
|
+
|
76
|
+
# 3. Verify the changes
|
77
|
+
print_info "Verifying version updates..."
|
78
|
+
VERSION_PY=$(grep -E '^__version__' src/fips_agents_cli/version.py | cut -d'"' -f2)
|
79
|
+
VERSION_TOML=$(grep -E '^version' pyproject.toml | head -1 | cut -d'"' -f2)
|
80
|
+
|
81
|
+
if [ "$VERSION_PY" != "$VERSION" ] || [ "$VERSION_TOML" != "$VERSION" ]; then
|
82
|
+
print_error "Version verification failed!"
|
83
|
+
echo " version.py: $VERSION_PY"
|
84
|
+
echo " pyproject.toml: $VERSION_TOML"
|
85
|
+
echo " expected: $VERSION"
|
86
|
+
exit 1
|
87
|
+
fi
|
88
|
+
print_success "Version verification passed"
|
89
|
+
|
90
|
+
# 4. Show the changes
|
91
|
+
echo
|
92
|
+
print_info "Changes to be committed:"
|
93
|
+
git diff src/fips_agents_cli/version.py pyproject.toml README.md
|
94
|
+
echo
|
95
|
+
|
96
|
+
# 5. Commit the changes
|
97
|
+
print_info "Committing changes..."
|
98
|
+
git add src/fips_agents_cli/version.py pyproject.toml README.md
|
99
|
+
git commit -m "Bump version to $VERSION
|
100
|
+
|
101
|
+
$COMMIT_MSG"
|
102
|
+
print_success "Changes committed"
|
103
|
+
|
104
|
+
# 6. Push to main
|
105
|
+
print_info "Pushing to main..."
|
106
|
+
git push origin main
|
107
|
+
print_success "Pushed to main"
|
108
|
+
|
109
|
+
# 7. Create and push tag
|
110
|
+
print_info "Creating tag v$VERSION..."
|
111
|
+
git tag "v$VERSION"
|
112
|
+
print_success "Tag created"
|
113
|
+
|
114
|
+
print_info "Pushing tag v$VERSION..."
|
115
|
+
git push origin "v$VERSION"
|
116
|
+
print_success "Tag pushed"
|
117
|
+
|
118
|
+
echo
|
119
|
+
print_success "Release v$VERSION initiated!"
|
120
|
+
echo
|
121
|
+
echo "GitHub Actions will now:"
|
122
|
+
echo " 1. Create GitHub Release"
|
123
|
+
echo " 2. Build distribution packages"
|
124
|
+
echo " 3. Publish to PyPI"
|
125
|
+
echo
|
126
|
+
echo "Monitor progress at: https://github.com/rdwj/fips-agents-cli/actions"
|
127
|
+
echo "View release at: https://github.com/rdwj/fips-agents-cli/releases/tag/v$VERSION"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|