-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate sbt-gh-pages to create GH Pages from Scaladoc (closes #91)
- Loading branch information
1 parent
d0f5296
commit 0c4d3b4
Showing
8 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" | ||
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" | ||
ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR} | ||
ENCRYPTED_IV=${!ENCRYPTED_IV_VAR} | ||
|
||
git config --global user.name "$USER" | ||
git config --global user.email "$TRAVIS_BUILD_NUMBER@$TRAVIS_COMMIT" | ||
|
||
openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in project/travis-deploy-key.enc -out project/travis-deploy-key -d | ||
chmod 600 project/travis-deploy-key | ||
|
||
eval "$(ssh-agent -s)" | ||
ssh-add project/travis-deploy-key | ||
|
||
sbt ghpagesPushSite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,12 @@ import com.typesafe.tools.mima.plugin.MimaPlugin | |
// Scoverage plugin | ||
import scoverage.ScoverageKeys._ | ||
|
||
import com.typesafe.sbt.sbtghpages.GhpagesPlugin.autoImport._ | ||
import com.typesafe.sbt.site.SitePlugin.autoImport._ | ||
import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._ | ||
import com.typesafe.sbt.SbtGit.GitKeys.{gitBranch, gitRemoteRepo} | ||
import com.typesafe.sbt.site.preprocess.PreprocessPlugin.autoImport._ | ||
|
||
object BuildSettings { | ||
|
||
// Basic settings for our app | ||
|
@@ -90,4 +96,16 @@ object BuildSettings { | |
(coverageReport dependsOn (test in Test)).value | ||
} | ||
) | ||
|
||
val ghPagesSettings = Seq( | ||
ghpagesPushSite := (ghpagesPushSite dependsOn makeSite).value, | ||
ghpagesNoJekyll := false, | ||
gitRemoteRepo := "[email protected]:snowplow/snowplow-scala-analytics-sdk.git", | ||
gitBranch := Some("gh-pages"), | ||
siteSubdirName in SiteScaladoc := s"${version.value}", | ||
preprocessVars in Preprocess := Map("VERSION" -> version.value), | ||
excludeFilter in ghpagesCleanSite := new FileFilter { | ||
def accept(f: File) = true | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.3") | ||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.5.0") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.0") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Project Documentation</title> | ||
<script language="JavaScript"> | ||
<!-- | ||
function doRedirect() | ||
{ | ||
window.location.replace("@VERSION@"); | ||
} | ||
doRedirect(); | ||
//--> | ||
</script> | ||
</head> | ||
<body> | ||
<a href="@VERSION@">Go to the project documentation | ||
</a> | ||
</body> | ||
</html> |