Skip to content

Commit

Permalink
Merge pull request #2 from florisla/example-semantic
Browse files Browse the repository at this point in the history
Change format on disk + cosmetics in the MarkDown
  • Loading branch information
miraculixx authored Jan 15, 2021
2 parents 1115978 + 9625930 commit 643e542
Show file tree
Hide file tree
Showing 18 changed files with 96 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ values =
[bumpversion:part:build]
first_value = 1

[bumpversion:file:VERSION]
[bumpversion:file:VERSION.txt]
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patch
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.1-dev1
19 changes: 19 additions & 0 deletions docs/examples/semantic-versioning/1.0.1-dev1/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[bumpversion]
current_version = 1.0.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)([-](?P<release>(dev|rc))+(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{release}{build}
{major}.{minor}.{patch}

[bumpversion:part:release]
first_value = dev
optional_value = ga
values =
dev
rc
ga

[bumpversion:part:build]
first_value = 1

[bumpversion:file:VERSION.txt]
1 change: 1 addition & 0 deletions docs/examples/semantic-versioning/1.0.1-dev1/VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.1-dev2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.1-rc1
19 changes: 19 additions & 0 deletions docs/examples/semantic-versioning/1.0.1-rc1/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[bumpversion]
current_version = 1.0.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)([-](?P<release>(dev|rc))+(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{release}{build}
{major}.{minor}.{patch}

[bumpversion:part:release]
first_value = dev
optional_value = ga
values =
dev
rc
ga

[bumpversion:part:build]
first_value = 1

[bumpversion:file:VERSION.txt]
1 change: 1 addition & 0 deletions docs/examples/semantic-versioning/1.0.1-rc1/VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.1-rc2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.1
45 changes: 45 additions & 0 deletions docs/examples/semantic-versioning/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Semantic versioning example

bumpversion flow:

1.0.0 => 1.0.1-dev1 => 1.0.1-dev2 = > 1.0.1-rc1 => 1.0.1-rc2 => 1.0.1
patch build release build release

## Details

Start with an initial release, say `1.0.0`.

1. Create a new release, starting with a development build.

$ bumpversion patch
=> 1.0.1-dev1

2. Every time you build, bump `build`.

$ bumpversion build
=> 1.0.1-dev2

3. Go to release candidate by bumping `release`.

$ bumpversion release
=> 1.0.1-rc1

4. With every new build, bump `build`.

$ bumpversion build
=> 1.0.1-rc2

4. Finally, bump `release` to generate a final release for the current
`major` / `minor` / `patch` version.

$ bumpversion release
=> 1.0.1


## Notes

* Once the final release has been reached, it is not possible to bump
the `release` before bumping `patch` again. Trying to bump the release
while in final release state will issue
`ValueError: The part has already the maximum value among ['dev', 'rc', 'ga'] and cannot be bumped`.

47 changes: 0 additions & 47 deletions examples/semantic/README

This file was deleted.

0 comments on commit 643e542

Please sign in to comment.