Skip to content

Commit

Permalink
fixed the snap command and added another known issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tonylook committed Jan 18, 2024
1 parent 6c9b322 commit c6ee224
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

`rflow` is a Command Line Interface (CLI) tool designed to facilitate the management of release branches in software development projects. Using the Release Flow branching strategy. It simplifies creating release, major release, and fix branches, as well as tagging releases in a Git repository.

---

## 📦 Installation

Before installing `rflow`, ensure you have Python and Git installed on your system. `rflow` is developed and tested primarily on Python 3.
Expand Down Expand Up @@ -31,6 +33,8 @@ Clone the repository and install the required dependencies:
pip install -r requirements.txt
```

---

## 🧪 Running Tests

To run the tests, use the following command:
Expand All @@ -40,14 +44,20 @@ pytest tests/
```
Ensure you have `pytest` and `pytest-mock` installed in your environment.

---

## 📘 User Manual

For detailed instructions on how to use `rflow`, please refer to the [MANUAL.md](MANUAL.md) file in this repository. It provides comprehensive guidance on utilizing all the features of `rflow`.

---

## 🛠️ DevOps Manual

For detailed instructions on how to automatize versioning with `rflow`, please refer to the [DEVOPS.md](DEVOPS.md) file in this repository. It explains how to prepare your project for a fully automated versioning experience.

---

## Known Issues 🐛

Here's a list of known issues we're currently working on in `rflow`. We appreciate your understanding and patience as we work towards resolving them.
Expand All @@ -58,4 +68,12 @@ Here's a list of known issues we're currently working on in `rflow`. We apprecia
- **Impact**: This limitation affects the ability to tag releases directly from the main/master branch, which might be a part of some users' standard workflows.
- **Status**: I'm actively investigating ways to address this issue and hope to provide a solution in future updates. In the meantime, use the `rflow tag` command (as also compliant with Release Flow) on release branches for tagging releases.

### Issue with `rflow major` Command in CI/CD Environments

- **Description**: Currently, there's a bug with the `rflow major` command on the CI side. While the command operates correctly in CLI, creating a branch with the name of the major version, in CI environments it behaves like the `release` command, increasing the minor version instead.
- **Impact**: This issue affects users who rely on automated CI/CD pipelines for managing major version releases, as it does not correctly increment the major version as expected.
- **Status**: This discrepancy between CLI and CI behavior is under investigation. I'm working on identifying the cause and implementing a fix. For now, be cautious when using `rflow major` in automated CI/CD workflows and consider manual verification as a temporary workaround.



I encourage users to report any other issues they encounter on our GitHub issues page to help me continue improving `rflow`.
8 changes: 7 additions & 1 deletion rflow/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ def snap():
"""
try:
repo = git_operations.initialize_repo()
version = version_operations.read_current_version()
active_branch = repo.active_branch.name
main_branch_name = git_operations.get_main_branch_name(repo)
if active_branch == main_branch_name:
version = version_operations.read_next_version()
else:
version = version_operations.read_current_version()
timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
snapshot_tag = f'v{version}-{timestamp}'
repo.create_tag(snapshot_tag)
Expand All @@ -169,6 +174,7 @@ def snap():
raise click.Abort()



@cli.command()
@click.option('-f', '--force', is_flag=True, help='Force tag creation, overwriting if it already exists.')
def tag(force):
Expand Down

0 comments on commit c6ee224

Please sign in to comment.