diff options
author | Jakob Odersky <jakob@odersky.com> | 2017-02-24 22:41:31 -0800 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2017-02-24 22:41:44 -0800 |
commit | b3be3ea811d9c61843d800b976eb4b6c27076204 (patch) | |
tree | cab15430dfa67107a44e03f0b346c755a50111f2 /home/bin | |
parent | 051ff7398e1b913bfdbc10c59bc91b15b5922c10 (diff) | |
download | dotfiles-b3be3ea811d9c61843d800b976eb4b6c27076204.tar.gz dotfiles-b3be3ea811d9c61843d800b976eb4b6c27076204.tar.bz2 dotfiles-b3be3ea811d9c61843d800b976eb4b6c27076204.zip |
Remove custom sbt template script
Diffstat (limited to 'home/bin')
-rwxr-xr-x | home/bin/prelude | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/home/bin/prelude b/home/bin/prelude deleted file mode 100755 index 32dfe16..0000000 --- a/home/bin/prelude +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash -set -e - -print_usage() { - cat <<EOF >&2 -Usage: $0 <project_name> - -Create and initialize an sbt project. -Steps performed: -- create directory <name> -- initialize sbt build -- initialize git -EOF -} - -fail() { - echo "$1" >&2 - exit 1 -} - -name="" - -while [[ "$#" -gt 0 ]]; do - case "$1" in - -h|--help) - print_usage - exit 0 - ;; - *) - [[ -z "$name" ]] || (print_usage; fail) - name="$1" - ;; - esac - shift -done - -[[ -z "$name" ]] && (print_usage; fail) -[[ -e "$name" ]] && fail "$name already exists" - -mkdir "$name" - -mkdir "$name/project" -cat <<EOF > "$name/project/build.properties" -build.properties=0.13.13 -EOF - -cat <<EOF > "$name/build.sbt" -name := "$name" -organization in ThisBuild := "ch.jodersky" -version in ThisBuild := ("git describe --always --dirty=-SNAPSHOT --match v[0-9].*" !!).tail.trim - -scalaVersion in ThisBuild := "2.12.0" -scalacOptions in ThisBuild ++= Seq( - "-deprecation", - "-feature", - "-Xfatal-warnings", - "-Xlint" -) - -publishTo in ThisBuild := { - val nexus = "https://oss.sonatype.org/" - if (version.value.contains("SNAPSHOT")) - Some("snapshots" at nexus + "content/repositories/snapshots") - else - Some("releases" at nexus + "service/local/staging/deploy/maven2") -} -publishArtifact in Test in ThisBuild := false -licenses in ThisBuild := Seq("GPL 3.0" -> url("http://www.gnu.org/licenses/gpl-3.0.en.html")) -homepage in ThisBuild := Some(url("http://github.com/jodersky/$name")) -pomExtra in ThisBuild := - <scm> - <url>git@github.com:jodersky/$name.git</url> - <connection>scm:git:git@github.com:jodersky/$name.git</connection> - </scm> - <developers> - <developer> - <id>jodersky</id> - <name>Jakob Odersky</name> - <url>https://www.jodersky.ch</url> - </developer> - </developers> -EOF - -cat <<EOF > "$name/project/plugins.sbt" -// Sign published artifacts -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") - -// Publish to sonatype and sync with maven central -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1") -EOF - -cat <<EOF > "$name/.gitignore" -target/ -EOF - -git init "$name" -git -C "$name" add . -git -C "$name" commit -m "Initial commit" |