Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the inital files for the scalacheck exercises #1

Merged
merged 2 commits into from
Jul 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
project/project
project/target
target
.idea
.tmp

*.iml
/out
.idea_modules
.classpath
.project
/RUNNING_PID
.settings
.sass-cache
scalajvm/upload/*

# temp files
.~*
*~
*.orig

# eclipse
.scala_dependencies
.buildpath
.cache
.target
bin/
.ensime
.ensime_cache

# OSX
.DS_Store

# PGP keys
pubring.gpg
secring.gpg
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: scala
scala:
- 2.11.7
jdk:
- oraclejdk8
script:
- sbt test
after_success:
- bash deploy.sh
56 changes: 56 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
lazy val scalacheck = (project in file("."))
.settings(publishSettings:_*)
.enablePlugins(ExerciseCompilerPlugin)
.settings(
organization := "org.scala-exercises",
name := "exercises-scalacheck",
scalaVersion := "2.11.7",
version := "0.1.2",
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.sonatypeRepo("releases")
),
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "2.2.4",
"org.scala-exercises" %% "exercise-compiler" % version.value,
"org.scala-exercises" %% "definitions" % version.value,
"org.scalacheck" %% "scalacheck" % "1.12.5",
compilerPlugin("org.spire-math" %% "kind-projector" % "0.7.1")
)
)

// Distribution

lazy val gpgFolder = sys.env.getOrElse("SE_GPG_FOLDER", ".")

lazy val publishSettings = Seq(
organizationName := "Scala Exercises",
organizationHomepage := Some(new URL("https://scala-exercises.org")),
startYear := Some(2016),
description := "Scala Exercises: The path to enlightenment",
homepage := Some(url("http://scala-exercises.org")),
pgpPassphrase := Some(sys.env.getOrElse("SE_GPG_PASSPHRASE", "").toCharArray),
pgpPublicRing := file(s"$gpgFolder/pubring.gpg"),
pgpSecretRing := file(s"$gpgFolder/secring.gpg"),
credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", sys.env.getOrElse("PUBLISH_USERNAME", ""), sys.env.getOrElse("PUBLISH_PASSWORD", "")),
scmInfo := Some(ScmInfo(url("https://github.com/scala-exercises/exercises-scalacheck"), "https://github.com/scala-exercises/exercises-scalacheck.git")),
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := Function.const(false),
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("Snapshots" at nexus + "content/repositories/snapshots")
else
Some("Releases" at nexus + "service/local/staging/deploy/maven2")
},
pomExtra :=
<developers>
<developer>
<id>fedefernandez</id>
<name>Fede Fernández</name>
<email>fede.f@47deg.com</email>
</developer>
</developers>
)
23 changes: 23 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

function decipherKeys {
echo $KEYS_PASSPHRASE | gpg --passphrase-fd 0 keys.tar.gpg
tar xfv keys.tar
}

function publish {
sbt compile publishSigned
}

function release {
decipherKeys
publish
}

if [[ $TRAVIS_BRANCH == 'master' ]]; then
echo "Master branch, releasing..."
release
else
echo "Not in master branch, skipping release"
fi

Binary file added keys.tar.gpg
Binary file not shown.
1 change: 1 addition & 0 deletions project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=0.13.9
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.1.1", "0.13", "2.10")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")