You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,10 @@
8
8
9
9
## Introduction
10
10
11
-
This plugin can be used to determine the next release version based on previous tags and the commit messages used.
12
-
:warning: By default only [annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) are supported, to support non annotated tag you must use an option to activate this feature (see below).:warning:
13
-
It calculates the version number based on the format of the commit message.
11
+
This plugin can be used to determine the next release version based on previous tags and the commit messages used.
12
+
It can also be used to get the current version.
13
+
:warning: By default only [annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) are supported, to support non annotated tag you must use an option to activate this feature (see below).:warning:
14
+
It calculates the version number based on the format of the commit message.
14
15
The commit message format used is [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).
15
16
16
17
## Getting started
@@ -24,12 +25,14 @@ pipeline {
24
25
agent any
25
26
26
27
environment {
28
+
CURRENT_VERSION = currentVersion()
27
29
NEXT_VERSION = nextVersion()
28
30
}
29
31
30
32
stages {
31
33
stage('Hello') {
32
34
steps {
35
+
echo "current vesion = ${CURRENT_VERSION}"
33
36
echo "next version = ${NEXT_VERSION}"
34
37
}
35
38
}
@@ -42,6 +45,8 @@ pipeline {
42
45
def NEXT_VERSION
43
46
node {
44
47
stage('Get next version ...') {
48
+
CURRENT_VERSION=currentVersion()
49
+
echo "Current version: $CURRENT_VERSION"
45
50
NEXT_VERSION=nextVersion()
46
51
echo "Next version : $NEXT_VERSION"
47
52
}
@@ -54,7 +59,8 @@ node {
54
59
55
60
## Using Optional Parameters
56
61
57
-
The plugin provides provision to use optional parameters for support of build metadata, pre-release information, settnig the start tag, etc.
62
+
The plugin provides provision to use optional parameters for support of build metadata, pre-release information, settings the start tag, etc.
63
+
:warning: These parameters are only for the _nextVersion_ step ! :warning:
0 commit comments