Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Merge branch 'dont-use-version.conf' of dlab/hive
Browse files Browse the repository at this point in the history
from pull-request 1475

* refs/heads/dont-use-version.conf:
  Don't use version.conf

Reviewed-by: 채수원 <sw.chae@navercorp.com>
  • Loading branch information
이응준 committed Feb 10, 2015
2 parents 1e9e200 + ad07256 commit f798de7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
7 changes: 1 addition & 6 deletions app/utils/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@
*/
package utils;

import com.typesafe.config.ConfigFactory;
import models.SiteAdmin;
import org.apache.commons.lang3.ObjectUtils;
import play.Configuration;
import play.mvc.Http;

import java.io.File;
import java.net.*;
import java.nio.file.Paths;
import java.util.Enumeration;

public class Config {
Expand Down Expand Up @@ -263,9 +260,7 @@ public static String semverize(String ver) {
* @return the current version
*/
public static String getCurrentVersion() {
File versionFile = Paths.get("conf", "version.conf").toFile();

return ConfigFactory.parseFile(versionFile).resolve().getString("app.version");
return yobi.BuildInfo.version();
}

public static String getEmailFromImap() {
Expand Down
15 changes: 8 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ import java.nio.file.Paths

name := """yobi"""

val CONFIG_DIRNAME = "conf"
val VERSION_CONF = "version.conf"
val pathToVersionConfig = Paths.get(basePath, CONFIG_DIRNAME, VERSION_CONF)
val versionConf = ConfigFactory.parseFile(pathToVersionConfig.toFile()).resolve()

version := versionConf.getString("app.version")
version := "0.8.0-rc2"

libraryDependencies ++= Seq(
// Add your project dependencies here,
Expand Down Expand Up @@ -67,7 +62,13 @@ val projectSettings = Seq(
scalacOptions ++= Seq("-feature")
)

scalaVersion := "2.10.4"
buildInfoSettings

sourceGenerators in Compile <+= buildInfo

buildInfoKeys := Seq[BuildInfoKey](name, version)

buildInfoPackage := "yobi"

lazy val yobi = (project in file("."))
.enablePlugins(PlayScala)
Expand Down
1 change: 0 additions & 1 deletion conf/version.conf

This file was deleted.

2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.0.3")

addSbtPlugin("de.johoop" % "findbugs4sbt" % "1.3.0")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.3.2")

libraryDependencies += "org.javassist" % "javassist" % "3.18.2-GA"

0 comments on commit f798de7

Please sign in to comment.