diff --git a/README.MD b/README.MD index 4cf016c..6d6ee18 100644 --- a/README.MD +++ b/README.MD @@ -41,6 +41,7 @@ On success, you will receive a `HTTP 200` answer with a body containing the word Plugin version | GitBucket version :--------------|:----------------- +1.2.x | 4.x.y 1.1.x | 3.11.x 1.0.x | 3.6.x, 3.7.x, 3.8.x,, 3.9.x, 3.10.x @@ -57,6 +58,10 @@ sbt clean package ## Release Notes +### 1.2.0 + +- binary compatibility with gitbucket 4.x + ### 1.1 - recompilation to ensure binary compatibility with gitbucket 3.11 diff --git a/project/build.scala b/project/build.scala index 0abbda0..4f834c8 100644 --- a/project/build.scala +++ b/project/build.scala @@ -7,7 +7,7 @@ object MyBuild extends Build { val Organization = "fr.brouillard.gitbucket" val Name = "gitbucket-h2-backup-plugin" - val Version = "1.1" + val Version = "1.2.0" val ScalaVersion = "2.11.6" lazy val project = Project ( @@ -25,7 +25,8 @@ object MyBuild extends Build { "amateras-repo" at "http://amateras.sourceforge.jp/mvn/" ), libraryDependencies ++= Seq( - "gitbucket" % "gitbucket-assembly" % "3.11.0" % "provided", + "gitbucket" % "gitbucket-assembly" % "4.0.0" % "provided", + "io.github.gitbucket" % "solidbase" % "1.0.0" % "provided", "com.typesafe.play" %% "twirl-compiler" % "1.0.4" % "provided", "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided" ), diff --git a/src/main/scala/Plugin.scala b/src/main/scala/Plugin.scala index 7cffa47..3add533 100644 --- a/src/main/scala/Plugin.scala +++ b/src/main/scala/Plugin.scala @@ -1,9 +1,8 @@ -import javax.servlet.ServletContext - import fr.brouillard.gitbucket.h2.controller.H2BackupController -import gitbucket.core.plugin.PluginRegistry -import gitbucket.core.service.SystemSettingsService.SystemSettings -import gitbucket.core.util.Version +import io.github.gitbucket.solidbase.model.Version +import gitbucket.core.controller.Context +import gitbucket.core.plugin.Link + class Plugin extends gitbucket.core.plugin.Plugin { override val pluginId: String = "h2-backup" @@ -13,25 +12,13 @@ class Plugin extends gitbucket.core.plugin.Plugin { override val description: String = "Allows to export h2 database of gitbucket" override val versions: List[Version] = List( - Version(1, 0) + new Version("1.2.0"), + new Version("1.0.0") ) - override def javaScripts(registry: PluginRegistry, context: ServletContext, settings: SystemSettings): Seq[(String, String)] = { - // Add Snippet link to the header - val path = settings.baseUrl.getOrElse(context.getContextPath) - Seq( - ".*/admin/h2backup" -> s""" - |$$('#system-admin-menu-container>li:last').after( - | $$('