diff --git a/README.md b/README.md index 77fd170..41788c3 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Version Plugin version|GitBucket version :-------------|:---------------- +7.0.x |4.32+ 6.1.x |4.26+ 6.0.x |4.23+ 5.0.x |4.21+ @@ -21,7 +22,7 @@ Plugin version|GitBucket version Download --- -You can download the JAR file from the [plugin registry](https://plugins.gitbucket-community.org/releases/gitbucket-explorer-plugin). +You can download the JAR file from the [Release](https://github.com/tomoki1207/gitbucket-explorer-plugin/releases) page. Installation --- @@ -38,6 +39,9 @@ See `package.json` for more details. Releases --- +### 7.0.0 - 7 Aug 2019 +- Bump to GitBucket 4.32.0 and Scala 2.13.0 + ### 6.1.0 - 1 Jul 2018 - Bump sbt-gitbucket-plugin to 1.3.0 to be hosted by the [plugin registry](https://plugins.gitbucket-community.org/) diff --git a/build.sbt b/build.sbt index a9a87de..ec09eaa 100644 --- a/build.sbt +++ b/build.sbt @@ -1,8 +1,8 @@ organization := "io.github.gitbucket" name := "gitbucket-explorer-plugin" -version := "6.1.0" -scalaVersion := "2.12.0" -gitbucketVersion := "4.26.0" +version := "7.0.0" +scalaVersion := "2.13.0" +gitbucketVersion := "4.32.0" scalacOptions := Seq("-deprecation", "-feature", "-language:postfixOps") javacOptions in compile ++= Seq("-target", "8", "-source", "8") diff --git a/package.json b/package.json index a0b633e..d96eba8 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test": "echo \"Error: no test specified\" && exit 1", "build": "browserify -t babelify ./scripts/index.js -o ./src/main/resources/explorer/assets/bundle.js && sbt assembly", "watch": "watchify -t babelify ./scripts/index.js -o ./src/main/resources/explorer/assets/bundle.js", - "release": "set NODE_ENV=production && browserify ./scripts/index.js -t babelify -t envify | uglifyjs -c warnings=false > ./src/main/resources/explorer/assets/bundle.js && sbt clean assembly" + "release": "set NODE_ENV=production && browserify ./scripts/index.js -t babelify -t envify | uglifyjs > ./src/main/resources/explorer/assets/bundle.js && sbt clean assembly" }, "author": "tomoki1207", "license": "MIT", diff --git a/project/build.properties b/project/build.properties index 5a1b382..dca663d 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.1.6 +sbt.version = 1.2.8 diff --git a/project/plugins.sbt b/project/plugins.sbt index 2ef067b..fed5395 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,2 @@ logLevel := Level.Warn -addSbtPlugin("io.github.gitbucket" % "sbt-gitbucket-plugin" % "1.3.0") +addSbtPlugin("io.github.gitbucket" % "sbt-gitbucket-plugin" % "1.5.0") diff --git a/src/main/scala/Plugin.scala b/src/main/scala/Plugin.scala index 5d0c4b2..dd7479d 100644 --- a/src/main/scala/Plugin.scala +++ b/src/main/scala/Plugin.scala @@ -22,7 +22,8 @@ class Plugin extends gitbucket.core.plugin.Plugin { new Version("4.0.0"), new Version("5.0.0"), new Version("6.0.0"), - new Version("6.1.0") + new Version("6.1.0"), + new Version("7.0.0") ) override val controllers = Seq( diff --git a/src/main/scala/io/github/gitbucket/explorer/controllers/ExplorerController.scala b/src/main/scala/io/github/gitbucket/explorer/controllers/ExplorerController.scala index d4b0068..2cd8d55 100644 --- a/src/main/scala/io/github/gitbucket/explorer/controllers/ExplorerController.scala +++ b/src/main/scala/io/github/gitbucket/explorer/controllers/ExplorerController.scala @@ -9,6 +9,7 @@ import gitbucket.core.util.SyntaxSugars._ import gitbucket.core.util.Directory._ import org.eclipse.jgit.api.Git import gitbucket.core.view.helpers +import scala.util.Using /** * Created by t_maruyama on 2017/01/31. @@ -32,7 +33,7 @@ trait ExplorerControllerBase extends ControllerBase { }) private def explore(repository: RepositoryService.RepositoryInfo, rev: String, path: String): Option[List[FileNode]] = { - using(Git.open(getRepositoryDir(repository.owner, repository.name))){ git => + Using.resource(Git.open(getRepositoryDir(repository.owner, repository.name))){ git => if(!JGitUtil.isEmpty(git)) { JGitUtil.getDefaultBranch(git, repository, rev).map { case (objectId, revision) => defining(JGitUtil.getRevCommitFromId(git, objectId)) { _ =>