diff --git a/build.gradle b/build.gradle index bb999ed4bd..6adff1b528 100644 --- a/build.gradle +++ b/build.gradle @@ -237,25 +237,39 @@ task tag { // increment the service segment in the version number and push it to master task incrementVersion { doLast { - def oldVersion = file('version.txt').text.trim() - def newVersion = "" - def matcher = version =~ "^(\\d+)\\.(\\d+).(\\d+)" - if (matcher.find()) { - def serviceSegment = Integer.parseInt(matcher.group(3)) + 1 - newVersion = matcher.group(1) + "." + matcher.group(2) + "." + serviceSegment - file('version.txt').text = newVersion - - Pattern bundleVersionPattern = Pattern.compile('(?<=Bundle-Version: )\\d+\\.\\d+\\.\\d+(?=\\.qualifier)') - file('.').eachFileRecurse { file -> - if (file.name == 'MANIFEST.MF') { - replacePatternsInFile(file, [(bundleVersionPattern): newVersion]) + def githubAccessKey = findProperty("githubAccessKey") + if (!githubAccessKey) { + throw new IllegalStateException("Cannot increment version: define GitHub access key with -PgithubAccessKey= project property") + } else { + // update version file + def oldVersion = file('version.txt').text.trim() + def newVersion = "" + def matcher = version =~ "^(\\d+)\\.(\\d+).(\\d+)" + if (matcher.find()) { + def serviceSegment = Integer.parseInt(matcher.group(3)) + 1 + newVersion = matcher.group(1) + "." + matcher.group(2) + "." + serviceSegment + file('version.txt').text = newVersion + + Pattern bundleVersionPattern = Pattern.compile('(?<=Bundle-Version: )\\d+\\.\\d+\\.\\d+(?=\\.qualifier)') + file('.').eachFileRecurse { file -> + if (file.name == 'MANIFEST.MF') { + replacePatternsInFile(file, [(bundleVersionPattern): newVersion]) + } } + } else { + throw new IllegalStateException("Unparseable version: $oldVersion.") } - } else { - throw new IllegalStateException("Unparseable version: $oldVersion.") + + // set access token + System.setProperty("org.ajoberstar.grgit.auth.username", githubAccessKey) + + // commit and push changes + grgit.commit { + message = "Increment version $oldVersion -> $newVersion" + all = true + } + grgit.push() } - exec { commandLine 'git', 'commit', '-a', '-m', "Increment version from $oldVersion to $newVersion" } - exec { commandLine 'git', 'push', githubAuthenticatedHost, 'master' } } } diff --git a/org.eclipse.buildship.branding/META-INF/MANIFEST.MF b/org.eclipse.buildship.branding/META-INF/MANIFEST.MF index 7c08388813..40c991d0c0 100644 --- a/org.eclipse.buildship.branding/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.branding/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Buildship, Eclipse Plug-ins for Gradle Bundle-SymbolicName: org.eclipse.buildship.branding;singleton:=true -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Vendor: Eclipse Buildship Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ClassPath: . diff --git a/org.eclipse.buildship.compat/META-INF/MANIFEST.MF b/org.eclipse.buildship.compat/META-INF/MANIFEST.MF index bef6963137..6e3838d8c9 100644 --- a/org.eclipse.buildship.compat/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.compat/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Buildship, Eclipse Plug-ins for Gradle - Compatibility classes Bundle-SymbolicName: org.eclipse.buildship.compat;singleton:=true -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Vendor: Eclipse Buildship Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.buildship.core.test/META-INF/MANIFEST.MF b/org.eclipse.buildship.core.test/META-INF/MANIFEST.MF index fa2d43e177..d29dbaa08f 100644 --- a/org.eclipse.buildship.core.test/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.core.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Buildship, Eclipse Plug-ins for Gradle - Core Test Bundle-SymbolicName: org.eclipse.buildship.core.test;singleton:=true -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Vendor: Eclipse Buildship Bundle-RequiredExecutionEnvironment: JavaSE-11 Fragment-Host: org.eclipse.buildship.core diff --git a/org.eclipse.buildship.core/META-INF/MANIFEST.MF b/org.eclipse.buildship.core/META-INF/MANIFEST.MF index b5f313e642..5005bf19f9 100644 --- a/org.eclipse.buildship.core/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Buildship, Eclipse Plug-ins for Gradle - Core Bundle-SymbolicName: org.eclipse.buildship.core;singleton:=true -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Vendor: Eclipse Buildship Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-Activator: org.eclipse.buildship.core.internal.CorePlugin diff --git a/org.eclipse.buildship.gradleprop.ls/META-INF/MANIFEST.MF b/org.eclipse.buildship.gradleprop.ls/META-INF/MANIFEST.MF index 1b2465cf26..c9b05a5c5d 100644 --- a/org.eclipse.buildship.gradleprop.ls/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.gradleprop.ls/META-INF/MANIFEST.MF @@ -2,4 +2,4 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Language Server Bundle-SymbolicName: org.eclipse.buildship.gradleprop.ls;singleton:=true -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 3.1.10.qualifier diff --git a/org.eclipse.buildship.gradleprop.provider/META-INF/MANIFEST.MF b/org.eclipse.buildship.gradleprop.provider/META-INF/MANIFEST.MF index 382ecf36b5..bb5e0050b6 100644 --- a/org.eclipse.buildship.gradleprop.provider/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.gradleprop.provider/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Provider Bundle-SymbolicName: org.eclipse.buildship.gradleprop.provider;singleton:=true -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.eclipse.core.contenttype, org.eclipse.ui, diff --git a/org.eclipse.buildship.gradleprop.test/META-INF/MANIFEST.MF b/org.eclipse.buildship.gradleprop.test/META-INF/MANIFEST.MF index fef3bab4f3..fd3d895d6f 100644 --- a/org.eclipse.buildship.gradleprop.test/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.gradleprop.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Buildship, Eclipse Plug-ins for Gradle - gradle.properties editor test Bundle-SymbolicName: org.eclipse.buildship.gradleprop.test;singleton:=true -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Vendor: Eclipse Buildship Bundle-RequiredExecutionEnvironment: JavaSE-11 Fragment-Host: org.eclipse.buildship.gradleprop.provider diff --git a/org.eclipse.buildship.kotlin/META-INF/MANIFEST.MF b/org.eclipse.buildship.kotlin/META-INF/MANIFEST.MF index e758f1c176..3f6184f675 100644 --- a/org.eclipse.buildship.kotlin/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.kotlin/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Buildship, Eclipse Plug-ins for Gradle - Kotlin script support Bundle-SymbolicName: org.eclipse.buildship.kotlin;singleton:=true -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Vendor: Eclipse Buildship Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-Activator: org.eclipse.buildship.kotlin.KotlinPlugin diff --git a/org.eclipse.buildship.kotlindsl.provider/META-INF/MANIFEST.MF b/org.eclipse.buildship.kotlindsl.provider/META-INF/MANIFEST.MF index 5b211b948f..a6a5b760cd 100644 --- a/org.eclipse.buildship.kotlindsl.provider/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.kotlindsl.provider/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Provider Bundle-SymbolicName: org.eclipse.buildship.kotlindsl.provider;singleton:=true -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 3.1.10.qualifier Require-Bundle: org.eclipse.core.contenttype, org.eclipse.ui, org.eclipse.lsp4e, diff --git a/org.eclipse.buildship.oomph.edit/META-INF/MANIFEST.MF b/org.eclipse.buildship.oomph.edit/META-INF/MANIFEST.MF index 1da5cc3e0d..a1fce2e94d 100644 --- a/org.eclipse.buildship.oomph.edit/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.oomph.edit/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.buildship.oomph.edit;singleton:=true Automatic-Module-Name: org.eclipse.buildship.oomph.edit -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.buildship.oomph.provider.GradleImportEditPlugin$Implementation Bundle-ActivationPolicy: lazy diff --git a/org.eclipse.buildship.oomph.test/META-INF/MANIFEST.MF b/org.eclipse.buildship.oomph.test/META-INF/MANIFEST.MF index c5693c110e..e551e5b5f5 100644 --- a/org.eclipse.buildship.oomph.test/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.oomph.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Buildship, Eclipse Plug-ins for Gradle - Oomph Import Setup Task UI Test Bundle-SymbolicName: org.eclipse.buildship.oomph.test;singleton:=true -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Vendor: Eclipse Buildship Bundle-RequiredExecutionEnvironment: JavaSE-11 Fragment-Host: org.eclipse.buildship.oomph diff --git a/org.eclipse.buildship.oomph/META-INF/MANIFEST.MF b/org.eclipse.buildship.oomph/META-INF/MANIFEST.MF index c280dffd31..08e9e4c0d3 100644 --- a/org.eclipse.buildship.oomph/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.oomph/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.buildship.oomph;singleton:=true Automatic-Module-Name: org.eclipse.buildship.oomph -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-ClassPath: . Bundle-ActivationPolicy: lazy Bundle-Localization: plugin diff --git a/org.eclipse.buildship.ui.test/META-INF/MANIFEST.MF b/org.eclipse.buildship.ui.test/META-INF/MANIFEST.MF index 6cd7a9df4a..a43d224729 100644 --- a/org.eclipse.buildship.ui.test/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.ui.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Buildship, Eclipse Plug-ins for Gradle - UI Test Bundle-SymbolicName: org.eclipse.buildship.ui.test;singleton:=true -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Vendor: Eclipse Buildship Bundle-RequiredExecutionEnvironment: JavaSE-11 Fragment-Host: org.eclipse.buildship.ui diff --git a/org.eclipse.buildship.ui/META-INF/MANIFEST.MF b/org.eclipse.buildship.ui/META-INF/MANIFEST.MF index cf6a54657f..ba58568d8a 100644 --- a/org.eclipse.buildship.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.buildship.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Buildship, Eclipse Plug-ins for Gradle - UI Bundle-SymbolicName: org.eclipse.buildship.ui;singleton:=true -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Vendor: Eclipse Buildship Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-Activator: org.eclipse.buildship.ui.internal.UiPlugin diff --git a/org.gradle.toolingapi/META-INF/MANIFEST.MF b/org.gradle.toolingapi/META-INF/MANIFEST.MF index 6b4da8c0ba..b648a3f83e 100644 --- a/org.gradle.toolingapi/META-INF/MANIFEST.MF +++ b/org.gradle.toolingapi/META-INF/MANIFEST.MF @@ -29,4 +29,4 @@ Export-Package: org.gradle.api;version="8.1.1", org.gradle.tooling.model.idea;version="8.1.1", org.gradle.tooling.model.java;version="8.1.1", org.gradle.tooling.model.kotlin.dsl;version="8.1.1" -Bundle-Version: 8.1.1.qualifier +Bundle-Version: 3.1.10.qualifier diff --git a/samples/custom-tapi-model/org.eclipse.buildship.sample.custommodel/META-INF/MANIFEST.MF b/samples/custom-tapi-model/org.eclipse.buildship.sample.custommodel/META-INF/MANIFEST.MF index 857f8627f7..ec44b78265 100644 --- a/samples/custom-tapi-model/org.eclipse.buildship.sample.custommodel/META-INF/MANIFEST.MF +++ b/samples/custom-tapi-model/org.eclipse.buildship.sample.custommodel/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Buildship Sample - Custom Tooling API model Bundle-SymbolicName: org.eclipse.buildship.sample.custommodel;singleton:=true -Bundle-Version: 3.1.7.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Activator: org.eclipse.buildship.sample.Activator Require-Bundle: org.eclipse.core.runtime, org.eclipse.ui, diff --git a/version.txt b/version.txt index 7148b0a991..edcc0e556c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.1.9 +3.1.10 \ No newline at end of file