Skip to content

Commit 215a44a

Browse files
committed
Merge branch 'scalatra-2.6' of https://github.com/gitbucket/gitbucket-gist-plugin into scalatra-2.6
2 parents 0cd3768 + b2f53c8 commit 215a44a

File tree

4 files changed

+11
-19
lines changed

4 files changed

+11
-19
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ See [Connect to H2 database](https://github.com/gitbucket/gitbucket/wiki/Connect
3737

3838
## Build from source
3939

40-
1. Install sbt and hit `sbt package` in the root directory of this repository.
41-
2. Copy `target/scala-2.12/gitbucket-gist-plugin_2.12-x.x.x.jar` into `GITBUCKET_HOME/plugins`.
42-
3. Restart GitBucket.
40+
1. Install sbt and hit `sbt assembly` in the root directory of this repository.
41+
2. Copy `target/scala-2.12/gitbucket-gist-plugin-assembly-x.x.x.jar` into `GITBUCKET_HOME/plugins`.
42+
3. GitBucket restarts automatically.
43+
44+
or you can build and install by just hitting `sbt install`.

build.sbt

+4-15
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
val Organization = "io.github.gitbucket"
2-
val ProjectName = "gitbucket-gist-plugin"
3-
val ProjectVersion = "4.11.0"
4-
val GitBucketVersion = Option(System.getProperty("gitbucket.version")).getOrElse("4.19.0")
5-
6-
lazy val root = (project in file(".")).enablePlugins(SbtTwirl)
7-
8-
organization := Organization
9-
name := ProjectName
10-
version := ProjectVersion
1+
organization := "io.github.gitbucket"
2+
name := "gitbucket-gist-plugin"
3+
version := "4.11.0"
114
scalaVersion := "2.12.4"
12-
13-
libraryDependencies ++= Seq(
14-
"io.github.gitbucket" %% "gitbucket" % GitBucketVersion % "provided",
15-
"javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided"
16-
)
5+
gitbucketVersion := Option(System.getProperty("gitbucket.version")).getOrElse("4.19.0")
176

187
scalacOptions := Seq("-deprecation", "-feature", "-language:postfixOps")
198
javacOptions in compile ++= Seq("-target", "8", "-source", "8")

project/plugins.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
logLevel := Level.Warn
22

33
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.12")
4+
addSbtPlugin("io.github.gitbucket" % "sbt-gitbucket-plugin" % "1.2.0")

src/main/scala/gitbucket/gist/controller/GistController.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ trait GistControllerBase extends ControllerBase {
193193
case Right((revisions, hasNext)) => {
194194
val commits = revisions.map { revision =>
195195
defining(JGitUtil.getRevCommitFromId(git, git.getRepository.resolve(revision.id))){ revCommit =>
196-
JGitUtil.getDiffs(git, revision.id, false) match { case (diffs, oldCommitId) =>
196+
JGitUtil.getDiffs(git, revision.id, true) match { case (diffs, oldCommitId) =>
197197
(revision, diffs)
198198
}
199199
}

0 commit comments

Comments
 (0)