Skip to content

Commit

Permalink
Increment version 3.1.9 -> 3.1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
donat committed Jan 16, 2024
1 parent 548ec8d commit 4173aaf
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 33 deletions.
46 changes: 30 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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=<access_key> 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' }
}
}

Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.branding/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
2 changes: 1 addition & 1 deletion org.eclipse.buildship.compat/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.core.test/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.gradleprop.ls/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.gradleprop.test/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.kotlin/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.oomph.edit/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.oomph.test/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.oomph/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.ui.test/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.buildship.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion org.gradle.toolingapi/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.9
3.1.10

0 comments on commit 4173aaf

Please sign in to comment.