[ci skip] Move delimiting dash into versionMetadata resolver

This commit is contained in:
William committed 2023-04-16 17:30:34 +01:00
1 parent 87a648a8a3
commit 5f2b4ebcdf
1 file changed
+3 -3
+3 -3
View File
@@ -9,7 +9,7 @@ plugins {
}
group 'net.william278'
version "$ext.plugin_version-${versionMetadata()}"
version "$ext.plugin_version${versionMetadata()}"
description "$ext.plugin_description"
defaultTasks 'licenseFormat', 'build'
@@ -135,8 +135,8 @@ def versionMetadata() {
// Otherwise, get the last commit hash and if it's a clean head
if (grgit == null) {
return System.getenv("GITHUB_RUN_NUMBER") ? 'build.' + System.getenv("GITHUB_RUN_NUMBER") : 'unknown'
return '-' + System.getenv("GITHUB_RUN_NUMBER") ? 'build.' + System.getenv("GITHUB_RUN_NUMBER") : 'unknown'
}
return grgit.head().abbreviatedId + (grgit.status().clean ? '' : '-indev')
return '-' + grgit.head().abbreviatedId + (grgit.status().clean ? '' : '-indev')
}