Skip to content

Commit f73a5d5

Browse files
committed
Only include example projects when not a tag is checked out
1 parent 44d7727 commit f73a5d5

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

build.sbt

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import BuildHelper.*
22
import Dependencies.{scalafmt, *}
3+
import scala.sys.process.*
34

45
import scala.concurrent.duration.*
56

@@ -126,6 +127,18 @@ inThisBuild(
126127

127128
ThisBuild / githubWorkflowBuildTimeout := Some(60.minutes)
128129

130+
lazy val exampleProjects: Seq[ProjectReference] = if ("git describe --tags --exact-match".! == 0) Seq.empty[ProjectReference] else Seq[ProjectReference](
131+
zioHttpExampleBasicAuth,
132+
zioHttpExampleCookieAuth,
133+
zioHttpExampleDigestAuth,
134+
zioHttpExampleOpaqueBearerTokenAuth,
135+
zioHttpExampleJwtBearerTokenAuth,
136+
zioHttpExampleJwtBearerRefreshTokenAuth,
137+
zioHttpExampleOauthBearerTokenAuth,
138+
zioHttpExampleWebauthn,
139+
)
140+
141+
129142
lazy val aggregatedProjects: Seq[ProjectReference] =
130143
if (Shading.shadingEnabled) {
131144
Seq(
@@ -134,7 +147,7 @@ lazy val aggregatedProjects: Seq[ProjectReference] =
134147
zioHttpTestkit,
135148
)
136149
} else {
137-
Seq(
150+
Seq[ProjectReference](
138151
zioHttpJVM,
139152
zioHttpJS,
140153
zioHttpBenchmarks,
@@ -146,18 +159,10 @@ lazy val aggregatedProjects: Seq[ProjectReference] =
146159
zioHttpHtmx,
147160
zioHttpStomp,
148161
zioHttpExample,
149-
zioHttpExampleBasicAuth,
150-
zioHttpExampleCookieAuth,
151-
zioHttpExampleDigestAuth,
152-
zioHttpExampleOpaqueBearerTokenAuth,
153-
zioHttpExampleJwtBearerTokenAuth,
154-
zioHttpExampleJwtBearerRefreshTokenAuth,
155-
zioHttpExampleOauthBearerTokenAuth,
156-
zioHttpExampleWebauthn,
157162
zioHttpTestkit,
158163
zioHttpTools,
159164
docs,
160-
)
165+
) ++ exampleProjects
161166
}
162167

163168
lazy val root = (project in file("."))

0 commit comments

Comments
 (0)