Skip to content

Commit

Permalink
Merge pull request #225 from profunktor/update-2020
Browse files Browse the repository at this point in the history
Massive update
  • Loading branch information
gvolpe authored May 21, 2020
2 parents 91517e5 + 006329b commit 6b0ddd7
Show file tree
Hide file tree
Showing 51 changed files with 302 additions and 288 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
on:
push:
branches:
- master
tags:
- "*"

jobs:
build:
name: Publish
runs-on: ubuntu-18.04
steps:
- uses: "actions/checkout@v2.1.0"
- uses: "olafurpg/setup-scala@v5"
- uses: "olafurpg/setup-gpg@v2"
- env:
PGP_PASSPHRASE: "${{ secrets.PGP_PASSPHRASE }}"
PGP_SECRET: "${{ secrets.PGP_SECRET }}"
SONATYPE_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
SONATYPE_USERNAME: "${{ secrets.SONATYPE_USERNAME }}"
name: "Publish ${{ github.ref }}"
run: sbt ci-release
86 changes: 50 additions & 36 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,47 @@ import microsites.ExtraMdFileConfig

name := """https-tracer-root"""

organization in ThisBuild := "dev.profunktor"

crossScalaVersions in ThisBuild := Seq("2.12.10", "2.13.1")
ThisBuild / organization := "dev.profunktor"
ThisBuild / crossScalaVersions := List("2.12.10", "2.13.2")

sonatypeProfileName := "dev.profunktor"

promptTheme := PromptTheme(List(
text(_ => "[http4s-tracer]", fg(64)).padRight(" λ ")
))
promptTheme := PromptTheme(
List(
text(_ => "[http4s-tracer]", fg(64)).padRight(" λ ")
)
)

def uuidDep(v: String): Seq[ModuleID] =
def uuidDep(v: String): List[ModuleID] =
CrossVersion.partialVersion(v) match {
case Some((2, 13)) => Seq.empty
case _ => Seq(Libraries.gfcTimeuuid)
case Some((2, 13)) => List.empty
case _ => List(Libraries.gfcTimeuuid)
}

lazy val commonSettings = Seq(
inThisBuild(
List(
organization := "dev.profunktor",
homepage := Some(url("https://profunktor.dev/")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
developers := List()
)
)

lazy val commonSettings = List(
startYear := Some(2018),
licenses += ("Apache-2.0", new URL("https://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://http4s-tracer.profunktor.dev/")),
headerLicense := Some(HeaderLicense.ALv2("2018-2019", "ProfunKtor")),
libraryDependencies ++= Seq(
headerLicense := Some(HeaderLicense.ALv2("2018-2020", "ProfunKtor")),
testFrameworks += new TestFramework("munit.Framework"),
libraryDependencies ++= List(
compilerPlugin(Libraries.kindProjector),
compilerPlugin(Libraries.betterMonadicFor),
Libraries.catsEffect,
Libraries.fs2Core,
Libraries.http4sServer,
Libraries.http4sDsl,
Libraries.scalaTest % Test,
Libraries.scalaCheck % Test
Libraries.munitCore % Test,
Libraries.munitScalacheck % Test
),
libraryDependencies ++= uuidDep(scalaVersion.value),
resolvers += "Apache public" at "https://repository.apache.org/content/groups/public/",
Expand All @@ -50,7 +61,7 @@ lazy val commonSettings = Seq(
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra :=
<developers>
<developers>
<developer>
<id>gvolpe</id>
<name>Gabriel Volpe</name>
Expand All @@ -59,7 +70,7 @@ lazy val commonSettings = Seq(
</developers>
)

lazy val examplesDependencies = Seq(
lazy val examplesDependencies = List(
Libraries.http4sClient,
Libraries.http4sCirce,
Libraries.circeCore,
Expand All @@ -68,40 +79,45 @@ lazy val examplesDependencies = Seq(
Libraries.zioCore,
Libraries.zioCats,
Libraries.log4CatsSlf4j,
Libraries.logback % Runtime,
Libraries.logback % Runtime
)

lazy val root = project.in(file("."))
lazy val root = project
.in(file("."))
.aggregate(`http4s-tracer`, `http4s-tracer-log4cats`, examples, microsite)
.settings(noPublish)

lazy val noPublish = Seq(
lazy val noPublish = List(
publish := {},
publishLocal := {},
publishArtifact := false,
skip in publish := true
)

lazy val `http4s-tracer` = project.in(file("core"))
lazy val `http4s-tracer` = project
.in(file("core"))
.settings(commonSettings: _*)
.settings(libraryDependencies += Libraries.http4sClient % Test)
.enablePlugins(AutomateHeaderPlugin)

lazy val `http4s-tracer-log4cats` = project.in(file("log4cats"))
lazy val `http4s-tracer-log4cats` = project
.in(file("log4cats"))
.settings(commonSettings: _*)
.settings(libraryDependencies += Libraries.log4CatsCore)
.enablePlugins(AutomateHeaderPlugin)
.dependsOn(`http4s-tracer`)

lazy val examples = project.in(file("examples"))
lazy val examples = project
.in(file("examples"))
.settings(commonSettings: _*)
.settings(scalacOptions -= "-Ywarn-dead-code")
.settings(libraryDependencies ++= examplesDependencies)
.settings(noPublish)
.enablePlugins(AutomateHeaderPlugin)
.dependsOn(`http4s-tracer`, `http4s-tracer-log4cats`)

lazy val microsite = project.in(file("site"))
lazy val microsite = project
.in(file("site"))
.enablePlugins(MicrositesPlugin)
.settings(commonSettings: _*)
.settings(noPublish)
Expand All @@ -113,7 +129,7 @@ lazy val microsite = project.in(file("site"))
micrositeGithubRepo := "http4s-tracer",
micrositeBaseUrl := "",
micrositeExtraMdFiles := Map(
file("README.md") -> ExtraMdFileConfig(
file("README.md") -> ExtraMdFileConfig(
"index.md",
"home"
),
Expand All @@ -124,26 +140,24 @@ lazy val microsite = project.in(file("site"))
)
),
micrositePalette := Map(
"brand-primary" -> "#E05236",
"brand-secondary" -> "#631224",
"brand-tertiary" -> "#2D232F",
"gray-dark" -> "#453E46",
"gray" -> "#837F84",
"gray-light" -> "#E3E2E3",
"gray-lighter" -> "#F4F3F4",
"white-color" -> "#FFFFFF"
"brand-primary" -> "#E05236",
"brand-secondary" -> "#631224",
"brand-tertiary" -> "#2D232F",
"gray-dark" -> "#453E46",
"gray" -> "#837F84",
"gray-light" -> "#E3E2E3",
"gray-lighter" -> "#F4F3F4",
"white-color" -> "#FFFFFF"
),
micrositeGitterChannel := true,
micrositeGitterChannelUrl := "profunktor-dev/http4s-tracer",
micrositePushSiteWith := GitHub4s,
micrositeGithubToken := sys.env.get("GITHUB_TOKEN"),
fork in tut := true,
scalacOptions in Tut --= Seq(
scalacOptions in Tut --= List(
"-Xfatal-warnings",
"-Ywarn-unused-import",
"-Ywarn-numeric-widen",
"-Ywarn-dead-code",
"-Xlint:-missing-interpolator,_",
"-Xlint:-missing-interpolator,_"
)
)
.dependsOn(`http4s-tracer`, examples)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/dev/profunktor/tracer/Trace.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/dev/profunktor/tracer/Tracer.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/dev/profunktor/tracer/TracerDsl.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/dev/profunktor/tracer/TracerLog.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 ProfunKtor
* Copyright 2018-2020 ProfunKtor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 6b0ddd7

Please sign in to comment.