Skip to content

Commit f9e81e6

Browse files
authored
Merge pull request #43 from gitbucket/build-for-gitbucket-master
Build for master branch of GitBucket
2 parents 4c7b747 + 695eead commit f9e81e6

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ language: scala
33
jdk:
44
- oraclejdk8
55
script:
6-
- sbt test
6+
- ./build-gitbucket-plugin.sh

build-gitbucket-plugin.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
rm -rf gitbucket
3+
git clone https://github.com/gitbucket/gitbucket.git
4+
cd gitbucket
5+
6+
GITBUCKET_VERSION=`cat build.sbt | grep "GitBucketVersion =" | sed 's/^.*"\(.*\)".*$/\1/'`
7+
echo "GITBUCKET_VERSION: $GITBUCKET_VERSION"
8+
sbt publish-local
9+
10+
cd ..
11+
sbt -Dgitbucket.version=$GITBUCKET_VERSION test

build.sbt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
val Organization = "io.github.gitbucket"
22
val ProjectName = "gitbucket-gist-plugin"
33
val ProjectVersion = "4.10.0"
4+
val GitBucketVersion = Option(System.getProperty("gitbucket.version")).getOrElse("4.16.0")
45

56
lazy val root = (project in file(".")).enablePlugins(SbtTwirl)
67

@@ -10,9 +11,9 @@ version := ProjectVersion
1011
scalaVersion := "2.12.2"
1112

1213
libraryDependencies ++= Seq(
13-
"io.github.gitbucket" %% "gitbucket" % "4.15.0" % "provided",
14-
"com.typesafe.play" %% "twirl-compiler" % "1.3.0" % "provided",
15-
"javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided"
14+
"io.github.gitbucket" %% "gitbucket" % GitBucketVersion % "provided",
15+
"com.typesafe.play" %% "twirl-compiler" % "1.3.0" % "provided",
16+
"javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided"
1617
)
1718

1819
scalacOptions := Seq("-deprecation", "-feature", "-language:postfixOps")

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

Lines changed: 1 addition & 1 deletion
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) match { case (diffs, oldCommitId) =>
196+
JGitUtil.getDiffs(git, revision.id, false) match { case (diffs, oldCommitId) =>
197197
(revision, diffs)
198198
}
199199
}

0 commit comments

Comments
 (0)