-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding version number information into VersionningExtension
- Loading branch information
1 parent
f00810c
commit d4964c9
Showing
12 changed files
with
541 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/groovy/net/nemerosa/versioning/VersionNumber.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package net.nemerosa.versioning | ||
|
||
/** | ||
* Representation of a version number. | ||
* | ||
* This is generally a combination of three digits with an optional qualifier. | ||
* These digits are major, minor and path numbers. | ||
* | ||
* This representation is one of many interpretation of version number format. It is let to developer's appreciation. | ||
*/ | ||
class VersionNumber { | ||
/** | ||
* Major version | ||
*/ | ||
final int major | ||
|
||
/** | ||
* Minor version | ||
*/ | ||
final int minor | ||
|
||
/** | ||
* Patch version | ||
*/ | ||
final int patch | ||
|
||
/** | ||
* Optional qualifier | ||
*/ | ||
final String qualifier | ||
|
||
/** | ||
* version code | ||
*/ | ||
final int versionCode | ||
|
||
/** | ||
* Original full version string | ||
*/ | ||
final String versionString | ||
|
||
VersionNumber(int major, int minor, int patch, String qualifier, int versionCode, String versionString) { | ||
this.major = major | ||
this.minor = minor | ||
this.patch = patch | ||
this.qualifier = qualifier | ||
this.versionCode = versionCode | ||
this.versionString = versionString | ||
} | ||
} |
Oops, something went wrong.