File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 },
1313 "DoxygenBin" : {
1414 "type" : " string" ,
15- "description" : " [Optional] The path of the doxygen bin directory (Default: C:\\ Program Files\\ doxygen\\ bin)"
15+ "description" : " The path of the doxygen bin directory (Default: C:\\ Program Files\\ doxygen\\ bin)"
1616 },
1717 "Help" : {
1818 "type" : " boolean" ,
3939 " VSCode"
4040 ]
4141 },
42+ "KeepVersion" : {
43+ "type" : " boolean" ,
44+ "description" : " Don't update the version (Default: Minor version will be updated)"
45+ },
4246 "Major" : {
4347 "type" : " boolean" ,
44- "description" : " [Optional] Update the major version (Default: Minor version will be updated)"
48+ "description" : " Update the major version (Default: Minor version will be updated)"
4549 },
4650 "NoDocs" : {
4751 "type" : " boolean" ,
48- "description" : " [Optional] Sets that no docs should be created"
52+ "description" : " Sets that no docs should be created (Default: Automatically updating the version from the build config) "
4953 },
5054 "NoLogo" : {
5155 "type" : " boolean" ,
5761 },
5862 "Patch" : {
5963 "type" : " boolean" ,
60- "description" : " [Optional] Update the patch version (Default: Minor version will be updated)"
64+ "description" : " Update the patch version (Default: Minor version will be updated)"
6165 },
6266 "Plan" : {
6367 "type" : " boolean" ,
122126 },
123127 "Version" : {
124128 "type" : " string" ,
125- "description" : " [Optional] Provide a new version for the package"
129+ "description" : " Provide a new version for the package"
126130 }
127131 }
128132 }
Original file line number Diff line number Diff line change 11{
2- "currentVersion" : " 3.2.0"
2+ "currentVersion" : " 3.2.0"
33}
Original file line number Diff line number Diff line change @@ -21,13 +21,16 @@ internal class Build : NukeBuild
2121 [ Parameter ( "Update the patch version (Default: Minor version will be updated)" ) ]
2222 public bool Patch = false ;
2323
24+ [ Parameter ( "Don't update the version (Default: Minor version will be updated)" ) ]
25+ public bool KeepVersion = false ;
26+
2427 [ Parameter ( "Provide a new version for the package" ) ]
2528 public readonly string ? Version = null ;
2629
2730 [ Parameter ( "The path of the doxygen bin directory (Default: C:\\ Program Files\\ doxygen\\ bin)" ) ]
2831 public readonly string DoxygenBin = "C:\\ Program Files\\ doxygen\\ bin" ;
2932
30- [ Parameter ( "Sets that no docs should be created (Default: Automaticly updating the version from the build config)" ) ]
33+ [ Parameter ( "Sets that no docs should be created (Default: Automatically updating the version from the build config)" ) ]
3134 public readonly bool NoDocs = false ;
3235
3336 [ Solution ]
@@ -108,13 +111,19 @@ internal class Build : NukeBuild
108111 return ;
109112 }
110113
114+ if ( KeepVersion )
115+ {
116+ _workingVersion = version . ToString ( ) ;
117+ return ;
118+ }
119+
111120 if ( Major && Patch )
112121 {
113122 // Cancel the build process
114123 Assert . Fail ( "Can't update major and patch at the same time" ) ;
115124 }
116125
117- if ( Major || Patch )
126+ if ( ( Major || Patch ) )
118127 {
119128 if ( Major )
120129 {
You can’t perform that action at this time.
0 commit comments