rdopkg fix(7)
=============
:doctype: manpage


NAME
----
rdopkg-feature-fix - autogenerated from feature spec `fix.feature`


SYNOPSIS
--------

Introducing .spec fixes is a core functionality


SCENARIOS
---------

rdopkg fix - did not add description of changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit,
* *_When_* I run rdopkg fix,
* *_Then_* rdopkg state file is present

rdopkg fix
~~~~~~~~~~

* *_Given_* a distgit,
* *_When_* I run rdopkg fix,
* *_When_* I add description to .spec changelog,
* *_When_* I run rdopkg --continue,
* *_Then_* .spec file contains new changelog entry with 1 lines,
* *_Then_* new commit was created,
* *_Then_* rdopkg state file is not present,
* *_Then_* last commit message is:
....
"""
foo-bar-1.2.3-3


Changelog:
- Description of a change
"""
....

rdopkg fix - did not add description of changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit,
* *_When_* I run rdopkg fix,
* *_When_* I run rdopkg --continue,
* *_Then_* command output contains 'Description of changes is missing in %changelog.',
* *_Then_* no new commit was created,
* *_Then_* rdopkg state file is present

rdopkg fix - user reverted all changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit,
* *_When_* I run rdopkg fix,
* *_When_* I undo all changes,
* *_When_* I run rdopkg --continue,
* *_Then_* command output contains 'No distgit changes found',
* *_Then_* no new commit was created,
* *_Then_* rdopkg state file is present

rdopkg fix - user aborts
~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit,
* *_When_* I run rdopkg fix,
* *_When_* I undo all changes,
* *_When_* I run rdopkg --abort,
* *_Then_* no new commit was created,
* *_Then_* rdopkg state file is not present

rdopkg fix - user reruns
~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit,
* *_When_* I run rdopkg fix,
* *_When_* I run rdopkg fix,
* *_Then_* command output contains 'You're in the middle of previous action: fix',
* *_Then_* command output contains 'Please `--continue` or `--abort`',
* *_Then_* no new commit was created,
* *_Then_* rdopkg state file is present

rdopkg fix - user aborts and reruns
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit,
* *_When_* I run rdopkg fix,
* *_When_* I run rdopkg fix,
* *_When_* I undo all changes,
* *_When_* I run rdopkg --abort,
* *_When_* I run rdopkg fix,
* *_When_* I add description to .spec changelog,
* *_When_* I run rdopkg --continue,
* *_Then_* .spec file contains new changelog entry with 1 lines,
* *_Then_* new commit was created,
* *_Then_* rdopkg state file is not present,
* *_Then_* last commit message is:
....
"""
foo-bar-1.2.3-3


Changelog:
- Description of a change
"""
....

rdopkg fix - Normal semver nvr bumps consistently
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 2.0.0 and Release 0.1,
* *_When_* I run rdopkg fix,
* *_Then_* .spec file tag Release is 0.2%{?dist}

rdopkg fix - Normal semver nvr bumps consistently - with dist macro specified
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 2.0.0 and Release 0.1%{?dist},
* *_When_* I run rdopkg fix,
* *_Then_* .spec file tag Release is 0.2%{?dist}

rdopkg fix - Normal semver nvr bumps consistently
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 2.0.0 and Release 1%{?dist},
* *_When_* I run rdopkg fix,
* *_Then_* .spec file tag Release is 2%{?dist}

rdopkg fix - Normal semver nvr bumps consistently
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 2.0.0 and Release 15%{?dist},
* *_When_* I run rdopkg fix,
* *_Then_* .spec file tag Release is 16%{?dist}

rdopkg fix - Normal semver nvr bumps consistently
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 2.0.0 and Release 15.0%{?dist},
* *_When_* I run rdopkg fix,
* *_Then_* .spec file tag Release is 15.1%{?dist}

rdopkg fix - Release with %{?dist} in the middle bumps correctly
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 2.0.0 and Release 1.0%{?dist}.1,
* *_When_* I run rdopkg fix,
* *_Then_* .spec file tag Release is 1.1%{?dist}.1

