Skip to content

Commit a173b90

Browse files
committed
update dependencies
release rpm & deb packages to provde a more convenient installation experience
1 parent ea98b66 commit a173b90

7 files changed

Lines changed: 41 additions & 14 deletions

File tree

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,26 @@ Import Cassandra tables as JSON from stdin.
66
Using stdin/stdout opens the door to the land of pipes and thus enables to slice and dice the stream of JSON data using command line tools. Most useful for the processing of streamed json data will probably be the infamous [jq](https://github.com/stedolan/jq).
77

88

9-
###### Download the [current release](https://github.com/splink/cpipe/releases/download/v0.0.1/cpipe-0.0.1.zip), unzip and run with
10-
~~~bash
9+
###### Download the [current release]
10+
as Zip: https://github.com/splink/cpipe/releases/download/v0.0.2/cpipe-0.0.2.zip
11+
~~~bash
12+
unzip cpipe-0.0.2.zip
1113
./bin/cpipe --help
1214
~~~
1315

16+
as Rpm: https://github.com/splink/cpipe/releases/download/v0.0.2/cpipe-0.0.2.noarch.rpm
17+
~~~bash
18+
rpm -i cpipe-0.0.2.noarch.rpm
19+
cpipe --help
20+
~~~
21+
22+
as deb: https://github.com/splink/cpipe/releases/download/v0.0.2/cpipe-0.0.2_all.deb
23+
~~~bash
24+
dpkg -i cpipe-0.0.2.noarch.rpm
25+
cpipe --help
26+
~~~
27+
28+
1429
[![asciicast](https://asciinema.org/a/XLXvSasorNPkMHH5isH5U0KKq.svg)](https://asciinema.org/a/XLXvSasorNPkMHH5isH5U0KKq?autoplay=1&loop=1)
1530

1631
Build from source with [SBT](https://www.scala-sbt.org):

build.sbt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,26 @@ import scala.sys.process._
33

44
lazy val root = (project in file(".")).
55
enablePlugins(BuildInfoPlugin).
6-
enablePlugins(JavaAppPackaging).
6+
enablePlugins(JavaAppPackaging, RpmPlugin, DebianPlugin).
77
settings(
88
List(
99
maintainer := "maxmc",
1010
organization := "splink",
11-
scalaVersion := "2.12.7",
11+
scalaVersion := "2.12.8",
1212
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion, "commitId" -> "git rev-parse HEAD".!!.slice(0, 10)),
1313
buildInfoPackage := "org.splink.cpipe.config"
1414
) ++ releaseSettings ++ githubReleaseSettings,
1515
fork in run := true,
1616
name := "cpipe",
17-
libraryDependencies ++= Seq(
17+
rpmVendor := "splink",
18+
rpmPackager := Some("splink"),
19+
packageSummary := "Import/Export rows from a Cassandra database.",
20+
packageDescription := "Import/Export rows from a Cassandra database. Run 'cpipe --help' for more information.",
21+
rpmLicense := Some("Apache License Version 2.0"),
22+
packageName := "cpipe",
23+
packageArchitecture := "noarch",
24+
debianPackageDependencies := Seq("java8-runtime-headless"),
25+
libraryDependencies ++= Seq(
1826
logback,
1927
scallop,
2028
cassandra,
@@ -37,6 +45,8 @@ lazy val releaseSettings = Seq(
3745
commitReleaseVersion,
3846
tagRelease,
3947
pushChanges,
48+
releaseStepCommand("debian:packageBin"),
49+
releaseStepCommand("rpm:packageBin"),
4050
releaseStepCommand("universal:packageBin"),
4151
releaseStepCommand("githubRelease"),
4252
setNextVersion,
@@ -49,7 +59,9 @@ lazy val githubReleaseSettings = Seq(
4959
ghreleaseRepoOrg := organization.value,
5060
ghreleaseRepoName := name.value,
5161
ghreleaseAssets := Seq(
52-
target.value / "universal" / s"${name.value}-${version.value}.zip"
62+
target.value / "universal" / s"${name.value}-${version.value}.zip",
63+
target.value / s"${name.value}_${version.value}_all.deb",
64+
target.value / "rpm/RPMS" / packageArchitecture.value / s"${name.value}-${version.value}.${packageArchitecture.value}.rpm",
5365
),
5466
ghreleaseNotes := { tagName
5567
SimpleReader.readLine(s"Input release notes for $tagName: ").getOrElse("")

cpipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh
2-
./target/universal/stage/bin/cpipe $@
2+
$(dirname "${BASH_SOURCE[0]}")/target/universal/cpipe-0.0.2/bin/cpipe $@

project/Dependencies.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import sbt._
22

33
object Dependencies {
4-
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.5"
5-
lazy val playJson = "com.typesafe.play" %% "play-json" % "2.6.9"
6-
lazy val cassandra = "com.datastax.cassandra" % "cassandra-driver-core" % "3.6.0"
7-
lazy val scallop = "org.rogach" %% "scallop" % "3.1.3"
4+
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.1.0"
5+
lazy val playJson = "com.typesafe.play" %% "play-json" % "2.8.1"
6+
lazy val cassandra = "com.datastax.cassandra" % "cassandra-driver-core" % "3.8.0"
7+
lazy val scallop = "org.rogach" %% "scallop" % "3.2.0"
88
lazy val logback = "ch.qos.logback" % "logback-classic" % "1.2.3"
99
lazy val lz4 = "net.jpountz.lz4" % "lz4" % "1.3.0"
1010
}

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.2.3
1+
sbt.version=1.3.5

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.10")
1+
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.5.2")
22
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.10")
33
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
44
addSbtPlugin("ohnosequences" % "sbt-github-release" % "0.7.0")

version.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version in ThisBuild := "0.0.2-SNAPSHOT"
1+
version in ThisBuild := "0.0.2"

0 commit comments

Comments
 (0)