-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from 47deg/jp-fixes-config-yml-site-adds-multi…
…-task JP - Creates new makeMicrosite task
- Loading branch information
Showing
19 changed files
with
672 additions
and
387 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--style defaultWithAlign | ||
--maxColumn 100 |
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,13 @@ | ||
Copyright 2016 47 Degrees, LLC. <http://www.47deg.com> | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
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 |
---|---|---|
@@ -1,12 +1,30 @@ | ||
organization := "com.fortysevendeg" | ||
name := "sbt-microsites" | ||
version := "1.0.1-SNAPSHOT" | ||
sbtPlugin := true | ||
import sbt.Keys._ | ||
import de.heikoseeberger.sbtheader.license.Apache2_0 | ||
|
||
lazy val main = (project in file(".")) | ||
lazy val artifactSettings = Seq( | ||
name := "sbt-microsites", | ||
organization := "com.fortysevendeg", | ||
organizationName := "47 Degrees", | ||
organizationHomepage := Some(new URL("http://47deg.com")), | ||
headers := Map( | ||
"scala" -> Apache2_0("2016", "47 Degrees, LLC. <http://www.47deg.com>") | ||
) | ||
) | ||
|
||
lazy val commonSettings = Seq( | ||
sbtPlugin := true, | ||
scalaVersion in ThisBuild := "2.10.6", | ||
resolvers += Resolver.sonatypeRepo("releases"), | ||
libraryDependencies += "com.lihaoyi" %% "scalatags" % "0.6.0", | ||
scalafmtConfig in ThisBuild := Some(file(".scalafmt")) | ||
) ++ reformatOnCompileSettings | ||
|
||
lazy val allSettings = commonSettings ++ artifactSettings ++ tutSettings | ||
|
||
lazy val `sbt-microsites` = (project in file(".")) | ||
.settings(moduleName := "sbt-microsites") | ||
.settings(allSettings: _*) | ||
.settings(addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.3")) | ||
.settings(addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.3")) | ||
.settings(addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0")) | ||
.settings(tutSettings :_*) | ||
.settings(libraryDependencies += "com.lihaoyi" %% "scalatags" % "0.6.0") | ||
.enablePlugins(JavaServerAppPackaging, UniversalPlugin, JekyllPlugin) | ||
.settings(addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.3")) | ||
.settings(addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0")) | ||
.enablePlugins(JavaServerAppPackaging, UniversalPlugin, JekyllPlugin, AutomateHeaderPlugin) |
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 +1 @@ | ||
sbt.version = 0.13.8 | ||
sbt.version = 0.13.12 |
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,4 +1,7 @@ | ||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.5") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.3") | ||
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.3") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0") | ||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.1") | ||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "1.6.0") | ||
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.3.1") | ||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2") |
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,46 @@ | ||
lazy val gpgFolder = sys.env.getOrElse("GPG_FOLDER", ".") | ||
lazy val publishSnapshot = taskKey[Unit]("Publish only if the version is a SNAPSHOT") | ||
|
||
pgpPassphrase := Some(sys.env.getOrElse("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/47deg/sbt-microsites"), | ||
"https://github.com/47deg/sbt-microsites.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") | ||
} | ||
publishSnapshot := Def.taskDyn { | ||
if (isSnapshot.value) Def.task { | ||
PgpKeys.publishSigned.value | ||
} else Def.task(println("Actual version is not a Snapshot. Skipping publish.")) | ||
}.value | ||
|
||
pomExtra := | ||
<developers> | ||
<developer> | ||
<name>47 Degrees (twitter: @47deg)</name> | ||
<email>hello@47deg.com</email> | ||
</developer> | ||
<developer> | ||
<name>47 Degrees</name> | ||
</developer> | ||
</developers> |
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,22 +1,45 @@ | ||
/* | ||
* Copyright 2016 47 Degrees, LLC. <http://www.47deg.com> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package microsites | ||
|
||
import sbt._ | ||
|
||
trait MicrositeKeys { | ||
val microsite = taskKey[Seq[File]]("Create microsite files") | ||
val micrositeName = settingKey[String]("Microsite name") | ||
val micrositeDescription = settingKey[String]("Microsite description") | ||
val micrositeAuthor = settingKey[String]("Microsite author") | ||
val micrositeHomepage = settingKey[String]("Microsite homepage") | ||
val micrositeTwitter = settingKey[String]("Microsite twitter") | ||
val micrositeBaseUrl = settingKey[String]("Microsite site base url") | ||
val makeMicrosite = taskKey[Unit]("Main Task to build a Microsite") | ||
val microsite = taskKey[Seq[File]]("Create microsite files") | ||
val micrositeConfig = taskKey[Unit]("Copy microsite config to the site folder") | ||
val micrositeName = settingKey[String]("Microsite name") | ||
val micrositeDescription = settingKey[String]("Microsite description") | ||
val micrositeAuthor = settingKey[String]("Microsite author") | ||
val micrositeHomepage = settingKey[String]("Microsite homepage") | ||
val micrositeTwitter = settingKey[String]("Microsite twitter") | ||
val micrositeBaseUrl = settingKey[String]("Microsite site base url") | ||
val micrositeDocumentationUrl = settingKey[String]("Microsite site documentation url") | ||
val micrositeHighlightTheme = settingKey[String]("Microsite Highlight Theme") | ||
val micrositeImgDirectory = settingKey[File]("Optional. Microsite images directory. By default, it'll be the resourcesDirectory + '/microsite/img'") | ||
val micrositeCssDirectory = settingKey[File]("Optional. Microsite CSS directory. By default, it'll be the resourcesDirectory + '/microsite/css'") | ||
val micrositeExtratMdFiles = settingKey[Seq[File]]("Optional. Additional document files located in a different place from the tutSourceDirectory. By default, it's empty") | ||
val micrositePalette = settingKey[Map[String, String]]("Microsite palette") | ||
val micrositeHighlightTheme = settingKey[String]("Microsite Highlight Theme") | ||
val micrositeImgDirectory = settingKey[File]( | ||
"Optional. Microsite images directory. By default, it'll be the resourcesDirectory + '/microsite/img'") | ||
val micrositeCssDirectory = settingKey[File]( | ||
"Optional. Microsite CSS directory. By default, it'll be the resourcesDirectory + '/microsite/css'") | ||
val micrositeExtratMdFiles = settingKey[Map[File, String]]( | ||
"Optional. The key is related with the source file, the map value corresponds with the target relative file path. " + | ||
"This keys is useful for those document files that are located in a different places from the tutSourceDirectory. " + | ||
"By default, it's empty") | ||
val micrositePalette = settingKey[Map[String, String]]("Microsite palette") | ||
val micrositeGithubOwner = settingKey[String]("Microsite Github owner") | ||
val micrositeGithubRepo = settingKey[String]("Microsite Github repo") | ||
val micrositeGithubRepo = settingKey[String]("Microsite Github repo") | ||
} | ||
object MicrositeKeys extends MicrositeKeys | ||
object MicrositeKeys extends MicrositeKeys |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.