rdopkg new-version(7)
=====================
:doctype: manpage


NAME
----
rdopkg-feature-new-version - autogenerated from feature spec `new-version.feature`


SYNOPSIS
--------

Updating package to new version is a core feature


SCENARIOS
---------

rdopkg new-version --bump-only
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 2.0.0 and Release 3,
* *_When_* I run rdopkg new-version --bump-only -n 2.1.0,
* *_Then_* command output contains 'Action finished',
* *_Then_* .spec file tag Version is 2.1.0,
* *_Then_* .spec file tag Release is 1%{?dist},
* *_Then_* .spec file doesn't contain patches_base,
* *_Then_* .spec file contains new changelog entry with 1 lines,
* *_Then_* new commit was created,
* *_Then_* git is clean,
* *_Then_* last commit message is:
....
"""
foo-bar-2.1.0-1


Changelog:
- Update to 2.1.0
"""
....

rdopkg new-version with upstream patches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 0.1 and Release 0.1,
* *_Given_* a patches branch with 5 patches,
* *_Given_* a new version 1.0.0 with 2 patches from patches branch,
* *_When_* I run rdopkg new-version -lntU 1.0.0,
* *_Then_* command output contains 'Action finished',
* *_Then_* .spec file tag Version is 1.0.0,
* *_Then_* .spec file tag Release is 1%{?dist},
* *_Then_* .spec file doesn't contain patches_base,
* *_Then_* .spec file has 3 patches defined,
* *_Then_* .spec file contains new changelog entry with 1 lines,
* *_Then_* new commit was created,
* *_Then_* git is clean,
* *_Then_* last commit message is:
....
"""
foo-bar-1.0.0-1


Changelog:
- Update to 1.0.0
"""
....

rdopkg new-version --bump-only --bug <id>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 2.0.0 and Release 3,
* *_When_* I run rdopkg new-version --bump-only -n 2.1.0 --bug rhbz#12345,
* *_Then_* command output contains 'Action finished',
* *_Then_* .spec file contains new changelog entry with rhbz#12345,
* *_Then_* new commit was created,
* *_Then_* git is clean,
* *_Then_* last commit message contains rhbz#12345,
* *_Then_* last commit message is:
....
"""
foo-bar-2.1.0-1


Changelog:
- Update to 2.1.0 (rhbz#12345)


Resolves: rhbz#12345
"""
....

rdopkg new-version --bump-only --commit-header-file <file>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 2.0.0 and Release 3,
* *_Given_* a local file commitmsg containing "Testing Alternate Commit Header",
* *_When_* I run rdopkg new-version --bump-only -n --commit-header-file commitmsg 2.1.0,
* *_Then_* command output contains 'Action finished',
* *_Then_* new commit was created,
* *_Then_* git is clean,
* *_Then_* last commit message is:
....
"""
Testing Alternate Commit Header


Changelog:
- Update to 2.1.0
"""
....

rdopkg new-version --bump-only --bug <id> -H <file>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 2.0.0 and Release 3,
* *_Given_* a local file commitmsg:
....
"""
Testing


Multiline
Commit
Header
"""
....
* *_When_* I run rdopkg new-version --bump-only -n --bug rhbz#12345,rhbz#232323 -H commitmsg 2.1.0,
* *_Then_* command output contains 'Action finished',
* *_Then_* .spec file contains new changelog entry with rhbz#12345,
* *_Then_* .spec file contains new changelog entry with rhbz#232323,
* *_Then_* new commit was created,
* *_Then_* git is clean,
* *_Then_* last commit message contains rhbz#12345,
* *_Then_* last commit message contains rhbz#232323,
* *_Then_* last commit message is:
....
"""
Testing


Multiline
Commit
Header


Changelog:
- Update to 2.1.0 (rhbz#12345,rhbz#232323)


Resolves: rhbz#12345
Resolves: rhbz#232323
"""
....

rdopkg new-version without starting version git tag
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 0.1 and Release 0.1,
* *_Given_* a patches branch with 2 patches without version git tag,
* *_When_* I run rdopkg new-version -l 1.0.0,
* *_Then_* no new commit was created,
* *_Then_* git is clean,
* *_Then_* command output contains 'Invalid base patches branch git reference:'

rdopkg new-version without new version git tag
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* *_Given_* a distgit at Version 0.1 and Release 0.1,
* *_Given_* a patches branch with 2 patches,
* *_When_* I run rdopkg new-version -l 2.2.2,
* *_Then_* no new commit was created,
* *_Then_* git is clean,
* *_Then_* command output contains 'Invalid git reference: 2.2.2'

