summaryrefslogtreecommitdiff
blob: 0114e1d42b9e30f0cfa3ef2b635a110187688e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- a/project/VersionUtil.scala
+++ b/project/VersionUtil.scala
@@ -2,7 +2,7 @@
 
 import sbt.{stringToProcess => _, _}
 import Keys._
-import java.util.{Date, Locale, Properties, TimeZone}
+import java.util.{Calendar, Date, Locale, Properties, TimeZone}
 import java.io.{File, FileInputStream}
 import java.text.SimpleDateFormat
 
@@ -65,18 +65,13 @@
     val log = sLog.value
     val (dateObj, sha) = {
       try {
-        // Use JGit to get the commit date and SHA
-        import org.eclipse.jgit.storage.file.FileRepositoryBuilder
-        import org.eclipse.jgit.revwalk.RevWalk
-        val db = new FileRepositoryBuilder().findGitDir.build
-        val head = db.resolve("HEAD")
-        if (head eq null) {
-          log.info("No git HEAD commit found -- Using current date and 'unknown' SHA")
-          (new Date, "unknown")
-        } else {
-          val commit = new RevWalk(db).parseCommit(head)
-          (new Date(commit.getCommitTime.toLong * 1000L), commit.getName.substring(0, 7))
-        }
+        val commit = "c2a5883891a68180b143eb462c8b0cebc8d3b02"
+        val cal = Calendar.getInstance();
+        cal.set(Calendar.YEAR, 2017);
+        cal.set(Calendar.MONTH, Calendar.OCTOBER);
+        cal.set(Calendar.DAY_OF_MONTH, 11);
+        val date = cal.getTime();
+        (date, commit.substring(0, 7))
       } catch {
         case ex: Exception =>
           log.error("Could not determine commit date + SHA: " + ex)