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

Commit

Permalink
iss #34: use git hash for snapshot builds
Browse files Browse the repository at this point in the history
  • Loading branch information
maizy committed Oct 7, 2014
1 parent f6e12d6 commit 30b242b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
7 changes: 5 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import com.typesafe.sbt.SbtNativePackager._
import NativePackagerKeys._
import com.typesafe.sbt.SbtGit._

name := "keemun"

version := "0.0.1-SNAPSHOT"
versionWithGit

git.baseVersion := "0.0.1"

scalaVersion := "2.11.1"

Expand All @@ -28,6 +31,6 @@ linuxEtcDefaultTemplate := (baseDirectory.value / "debian" / "etc-default").asUR

debianPackageDependencies in Debian ++= Seq("oracle-java7-jre|openjdk-7-jre")

packageDescription := "github search tool"
packageDescription := scala.io.Source.fromFile(baseDirectory.value / "README.md").getLines().mkString

lazy val root = (project in file(".")).enablePlugins(PlayScala)
8 changes: 7 additions & 1 deletion build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ BIN=`which sbt`
SCRIPT_PATH=$(cd ${0%/*} && echo $PWD/${0##*/})
ROOT=`dirname "${SCRIPT_PATH}"`

RELEASE="${1}"

if [ -z "${BIN}" ]; then
echo "sbt not found in ${PATH}"
exit 1
fi

cd "${ROOT}"

"${BIN}" 'debian:packageBin'
if [ -n "${RELEASE}" ]; then
"${BIN}" "-Dproject.version=${RELEASE}" 'debian:packageBin'
else
"${BIN}" 'debian:packageBin'
fi
9 changes: 6 additions & 3 deletions docs/BuildDeb.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
```bash
# checkout keemun
cd keemun/
./build_dev.sh
dpkg -i target/keemun_X.Y.Z-SNAPSHOT_all.deb
./build_deb.sh
ls target/keemun_*.deb
dpkg -i target/keemun_X.Y.Z-hash.deb
```
where `X.Y.Z` - current project version
where `X.Y.Z` - current project version, `hash` - current git commit hash.

For building release version do: `./build_deb.sh 0.1`.

## Supported OS

Expand Down
6 changes: 4 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.4")

resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"

addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.6.4")

0 comments on commit 30b242b

Please sign in to comment.