@@ -77,7 +77,7 @@ val pluginGroup: String by project
77
77
// `pluginName_` variable ends with `_` because of the collision with Kotlin magic getter in the `intellij` closure.
78
78
// Read more about the issue: https://github.com/JetBrains/intellij-platform-plugin-template/issues/29
79
79
val pluginName_: String by project
80
- val pluginVersion: String = pluginVersion(major = " 2" , minor = " 1 " , patch = " 1 " )
80
+ val pluginVersion: String = pluginVersion(major = " 2" , minor = " 2 " , patch = " 0 " )
81
81
val pluginDescriptionFile: String by project
82
82
val pluginChangeNotesFile: String by project
83
83
@@ -168,12 +168,34 @@ tasks {
168
168
fun readResource (name : String ) = file(" resources/$name " ).readText()
169
169
170
170
/* *
171
- * Function which creates a plugin version.
171
+ * Function which creates a plugin version in SemVer format
172
+ *
173
+ * Examples:
174
+ *
175
+ * GIVEN (GitHub workflow environment):
176
+ * GITHUB_RUN_NUMBER: 30
177
+ * major: 2
178
+ * minor: 1
179
+ * patch: 1
180
+ * sdkVersion: IC-2022.2
181
+ *
182
+ * RETURNS:
183
+ * 2.1.1+30-IC-2022.2
184
+ *
185
+ *
186
+ * GIVEN (local dev environment):
187
+ * GITHUB_RUN_NUMBER: null
188
+ * major: 2
189
+ * minor: 2
190
+ * patch: 34
191
+ * sdkVersion: IC-2022.3
192
+ *
193
+ * RETURNS:
194
+ * 2.2.34+0-IC-2022.3+alpha
172
195
*/
173
196
fun pluginVersion (major : String , minor : String , patch : String ) =
174
197
listOf (
175
198
major,
176
199
minor,
177
- patch,
178
- maybeGithubRunNumber?.let { " $it -${descriptor.sdkVersion} " } ? : " 0-${descriptor.sdkVersion} +alpha"
200
+ maybeGithubRunNumber?.let { " $patch +$it -${descriptor.sdkVersion} " } ? : " $patch +0-${descriptor.sdkVersion} +alpha"
179
201
).joinToString(" ." )
0 commit comments