Skip to content

Commit

Permalink
Bump version to 0.2.1 (#392)
Browse files Browse the repository at this point in the history
* Bump version to 0.2.1
* Update provider versions to latest
* Remove snapshot repositories
* Update changelog.md
* Update besom scripts
  • Loading branch information
pawelprazak authored Feb 15, 2024
1 parent 0bd7bdd commit c285d1e
Show file tree
Hide file tree
Showing 42 changed files with 58 additions and 60 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using the Scala programming language. Scala support is currently in **Public Bet

* **[Besom Docs](https://virtuslab.github.io/besom/)**: Learn about Besom concepts, follow user-guides, and consult the reference documentation.

* **[Examples](https://github.com/VirtusLab/besom/tree/v0.2.0/examples)**: Browse Scala examples across many clouds and scenarios including containers, serverless,
* **[Examples](https://github.com/VirtusLab/besom/tree/v0.2.1/examples)**: Browse Scala examples across many clouds and scenarios including containers, serverless,
and infrastructure.

## <a name="getting-started"></a>Getting Started
Expand Down Expand Up @@ -44,7 +44,7 @@ using the Scala programming language. Scala support is currently in **Public Bet
To install the latest Scala Language Plugin release, run the following:

```bash
pulumi plugin install language scala 0.2.0 --server github://api.github.com/VirtusLab/besom
pulumi plugin install language scala 0.2.1 --server github://api.github.com/VirtusLab/besom
```

4. **Create a new project**:
Expand All @@ -58,7 +58,7 @@ using the Scala programming language. Scala support is currently in **Public Bet
mkdir besom-demo && cd besom-demo
```
```bash
pulumi new https://github.com/VirtusLab/besom/tree/v0.2.0/templates/aws
pulumi new https://github.com/VirtusLab/besom/tree/v0.2.1/templates/aws
```

5. **Deploy to the Cloud**:
Expand Down Expand Up @@ -94,7 +94,7 @@ using the Scala programming language. Scala support is currently in **Public Bet
To learn more, head over to
[virtuslab.github.io/besom](https://virtuslab.github.io/besom/) for much more information, including
[tutorial](https://virtuslab.github.io/besom/docs/tutorial),
[examples](https://github.com/VirtusLab/besom/tree/v0.2.0/examples),
[examples](https://github.com/VirtusLab/besom/tree/v0.2.1/examples),
and [architecture and programming model concepts](https://virtuslab.github.io/besom/docs/architecture).
## Explaining the project structure
Expand All @@ -109,8 +109,8 @@ Resources created in `Pulumi.run { ... }` block will be created by Pulumi.
A simple example using Scala CLI:
```scala
//> using scala "3.3.1"
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0"
//> using dep "org.virtuslab::besom-core:0.2.0"
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.1"
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-aws:6.2.1-core.0.2"
import besom.*
Expand Down
1 change: 0 additions & 1 deletion besom-cats/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//> using dep "org.typelevel::cats-effect:3.3.14"
//> using test.dep "org.scalameta::munit:1.0.0-M10"

//> using repository sonatype:snapshots

//> using publish.name "besom-cats"
//> using publish.organization "org.virtuslab"
Expand Down
1 change: 0 additions & 1 deletion besom-zio/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//> using dep "dev.zio::zio:2.0.17"
//> using test.dep "org.scalameta::munit:1.0.0-M10"

//> using repository sonatype:snapshots

//> using publish.name "besom-zio"
//> using publish.organization "org.virtuslab"
Expand Down
2 changes: 2 additions & 0 deletions codegen/src/model/SemanticVersion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ case class SemanticVersion(
else preCompared // pre-release version has lower precedence than a normal version
end compare

def isSnapshot: Boolean = preRelease.contains("SNAPSHOT")

lazy val preReleaseString: String = preRelease.map("-" + _).getOrElse("")
lazy val buildMetadataString: String = buildMetadata.map("+" + _).getOrElse("")

Expand Down
1 change: 0 additions & 1 deletion core/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
//> using dep "com.lihaoyi::pprint:0.6.6"
//> using test.dep "org.scalameta::munit:1.0.0-M10"

//> using repository sonatype:snapshots

//> using publish.name "besom-core"
//> using publish.organization "org.virtuslab"
Expand Down
1 change: 0 additions & 1 deletion examples/aws-eks/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-eks:2.2.1-core.0.2"

//> using repository sonatype:snapshots
3 changes: 1 addition & 2 deletions examples/aws-s3-folder/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.1"
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-aws:6.22.0-core.0.2"
//> using dep "org.virtuslab::besom-aws:6.22.1-core.0.2"

//> using repository sonatype:snapshots
3 changes: 1 addition & 2 deletions examples/aws-secrets-manager/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.1"
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-aws:6.22.0-core.0.2"
//> using dep "org.virtuslab::besom-aws:6.22.1-core.0.2"

//> using repository sonatype:snapshots
3 changes: 1 addition & 2 deletions examples/aws-webserver/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1
//> using dep org.virtuslab::besom-aws:6.22.0-core.0.2
//> using dep org.virtuslab::besom-aws:6.22.1-core.0.2
//> using dep org.virtuslab::besom-tls:5.0.0-core.0.2

//> using repository sonatype:snapshots
1 change: 0 additions & 1 deletion examples/docker-multi-container-app/infra/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-docker:4.5.1-core.0.2"

//> using repository sonatype:snapshots
3 changes: 1 addition & 2 deletions examples/gcp-cloudrun/infra/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.1"
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-gcp:7.8.0-core.0.2"
//> using dep "org.virtuslab::besom-gcp:7.9.0-core.0.2"
//> using dep "org.virtuslab::besom-docker:4.5.1-core.0.2"

//> using repository sonatype:snapshots

//> using exclude "app/*"
3 changes: 1 addition & 2 deletions examples/gcp-static-page/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.1"
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-gcp:7.8.0-core.0.2"
//> using dep "org.virtuslab::besom-gcp:7.9.0-core.0.2"

//> using repository sonatype:snapshots
1 change: 0 additions & 1 deletion examples/kubernetes-nginx/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-kubernetes:4.7.1-core.0.2"

//> using repository sonatype:snapshots
1 change: 0 additions & 1 deletion experimental/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
//> using dep "org.virtuslab::besom-kubernetes:4.7.1-core.0.2"
//> using dep "io.github.iltotore::iron:2.4.0"

//> using repository sonatype:snapshots
1 change: 0 additions & 1 deletion integration-tests/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
//> using dep org.virtuslab::besom-codegen:0.2.1
//> using dep org.scalameta::munit::1.0.0-M10

//> using repository sonatype:snapshots
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1

//> using repository sonatype:snapshots
//> using dep org.virtuslab::besom-cats:0.2.1
//> using dep "org.virtuslab::besom-purrl:0.5.0-core.0.2"
1 change: 0 additions & 1 deletion integration-tests/resources/compiler-plugin/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1

//> using repository sonatype:snapshots
1 change: 0 additions & 1 deletion integration-tests/resources/config-example/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1

//> using repository sonatype:snapshots
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {

dependencies {
implementation("org.scala-lang:scala3-library_3:3.3.1")
implementation("org.virtuslab:besom-core_3:0.2.0")
implementation("org.virtuslab:besom-core_3:0.2.1")
implementation("org.virtuslab:besom-fake-standard-resource_3:1.2.3-TEST")
implementation("org.virtuslab:besom-fake-external-resource_3:2.3.4-TEST")
if (project.hasProperty("besomBootstrapJar")) runtimeOnly(files(project.property("besomBootstrapJar") as String))
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/resources/executors/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>org.virtuslab</groupId>
<artifactId>besom-bootstrap_3</artifactId>
<version>0.2.0</version>
<version>0.2.1</version>
<scope>system</scope>
<systemPath>${besomBootstrapJar}</systemPath>
</dependency>
Expand All @@ -43,7 +43,7 @@
<dependency>
<groupId>org.virtuslab</groupId>
<artifactId>besom-core_3</artifactId>
<version>0.2.0</version>
<version>0.2.1</version>
</dependency>
<dependency>
<groupId>org.virtuslab</groupId>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/resources/executors/sbt/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ lazy val root = project
scalacOptions ++= Seq("-java-output-version", "11"),
javacOptions in (Compile, compile) ++= Seq("-source", "11", "-target", "11"),
libraryDependencies ++= Seq(
"org.virtuslab" %% "besom-core" % "0.2.0",
"org.virtuslab" %% "besom-core" % "0.2.1",
"org.virtuslab" %% "besom-fake-standard-resource" % "1.2.3-TEST",
"org.virtuslab" %% "besom-fake-external-resource" % "2.3.4-TEST"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
//> using dep "org.virtuslab::besom-fake-standard-resource:1.2.3-TEST"
//> using dep "org.virtuslab::besom-fake-external-resource:2.3.4-TEST"

//> using repository sonatype:snapshots
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1

//> using repository sonatype:snapshots
//> using dep "org.virtuslab::besom-kubernetes:4.7.1-core.0.2"
1 change: 0 additions & 1 deletion integration-tests/resources/logger-example/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1

//> using repository sonatype:snapshots
1 change: 0 additions & 1 deletion integration-tests/resources/random-example/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1

//> using repository sonatype:snapshots
//> using dep "org.virtuslab::besom-random:4.15.1-core.0.2"
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1

//> using repository sonatype:snapshots
//> using dep "org.virtuslab::besom-tls:5.0.0-core.0.2"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1

//> using repository sonatype:snapshots
1 change: 0 additions & 1 deletion integration-tests/resources/tls-example/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1

//> using repository sonatype:snapshots
//> using dep "org.virtuslab::besom-tls:5.0.0-core.0.2"
1 change: 0 additions & 1 deletion integration-tests/resources/zio-tls-example/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
//> using plugin org.virtuslab::besom-compiler-plugin:0.2.1
//> using dep org.virtuslab::besom-core:0.2.1

//> using repository sonatype:snapshots
//> using dep org.virtuslab::besom-zio:0.2.1
//> using dep "org.virtuslab::besom-tls:5.0.0-core.0.2"
1 change: 0 additions & 1 deletion language-plugin/bootstrap/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
//> using dep org.virtuslab::besom-json:0.2.1
//> using dep io.github.classgraph:classgraph:4.8.165

//> using repository sonatype:snapshots
29 changes: 22 additions & 7 deletions scripts/Version.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,39 @@ object Version:
println(s"$a $b")
}
case "bump" :: newBesomVersionStr :: Nil =>
val newBesomVersion = SemanticVersion.parse(newBesomVersionStr).fold(
e => throw Exception(s"Invalid version: $newBesomVersionStr", e), _.toString
)
val (newBesomVersion, isSnapshot) = SemanticVersion
.parse(newBesomVersionStr)
.fold(
e => throw Exception(s"Invalid version: $newBesomVersionStr", e),
v => (v.toString, v.isSnapshot)
)
println(s"Bumping Besom core version from '$besomVersion' to '$newBesomVersion'")
os.write.over(cwd / "version.txt", newBesomVersion)
println(s"Updated version.txt")
projectFiles()
val filesWithBesomDeps = projectFiles()
.collect { case (path, content) if content.linesIterator.exists(besomDependencyPattern.matches) => path -> content }
filesWithBesomDeps
.foreachEntry { case (path, content) =>
val newContent = content.linesIterator
val hasSnapshotRepo = content.linesIterator
.forall(line => line.contains("repository sonatype:snapshots"))
val newContent: Vector[String] = content.linesIterator.toVector
.map {
case line if line.contains("besom-fake-") => line // ignore
case besomDependencyPattern(prefix, version, suffix) =>
prefix + changeVersion(version, newBesomVersion) + suffix
case line => line // pass through
}
.mkString("\n") + "\n"
os.write.over(path, newContent)
.filter {
case line if !isSnapshot && line.contains("repository sonatype:snapshots") =>
false // remove snapshot repo from non-snapshot version
case _ => true
} ++ {
if isSnapshot && !hasSnapshotRepo then // add snapshot repo to snapshot version
Vector("//> using repository sonatype:snapshots")
else Vector.empty
}

os.write.over(path, newContent.mkString("\n") + "\n")
println(s"Updated $path")
}
case "update" :: Nil =>
Expand Down
1 change: 0 additions & 1 deletion scripts/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
//> using dep io.get-coursier:coursier_2.13:2.1.9
//> using dep org.virtuslab::besom-codegen:0.2.1

//> using repository sonatype:snapshots
3 changes: 1 addition & 2 deletions templates/aws/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.1"
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-aws:6.22.0-core.0.2"
//> using dep "org.virtuslab::besom-aws:6.22.1-core.0.2"

//> using repository sonatype:snapshots
1 change: 0 additions & 1 deletion templates/default/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-random:4.15.1-core.0.2"

//> using repository sonatype:snapshots
3 changes: 1 addition & 2 deletions templates/gcp/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.1"
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-gcp:7.8.0-core.0.2"
//> using dep "org.virtuslab::besom-gcp:7.9.0-core.0.2"

//> using repository sonatype:snapshots
1 change: 0 additions & 1 deletion templates/kubernetes/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
//> using dep "org.virtuslab::besom-core:0.2.1"
//> using dep "org.virtuslab::besom-kubernetes:4.7.1-core.0.2"

//> using repository sonatype:snapshots
11 changes: 11 additions & 0 deletions website/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
title: Changelog
---

0.2.1 (15-02-2024)
---

## Bug Fixes

* Fix URL validation to allow for kubernetes types [#385](https://github.com/VirtusLab/besom/pull/385)
* Loosen up and fix URN parsing [#389](https://github.com/VirtusLab/besom/pull/389)
* Fix serializer now skips fields with null value secrets [#386](https://github.com/VirtusLab/besom/pull/386)

* Full changelog is available at [GitHub (v0.2.0...v0.2.1)](https://github.com/VirtusLab/besom/compare/v0.2.0...v0.2.1)

0.2.0 (08-02-2024)
---

Expand Down
2 changes: 1 addition & 1 deletion website/docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
title: Examples
---

All examples are available in [Besom GitHub repository](https://github.com/VirtusLab/besom/tree/v0.2.0/examples).
All examples are available in [Besom GitHub repository](https://github.com/VirtusLab/besom/tree/v0.2.1/examples).
4 changes: 2 additions & 2 deletions website/docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To start your adventure with infrastructure-as-code with Scala follow these step
To install the latest Scala Language Plugin release, run the following:

```bash
pulumi plugin install language scala 0.2.0 --server github://api.github.com/VirtusLab/besom
pulumi plugin install language scala 0.2.1 --server github://api.github.com/VirtusLab/besom
```

4. **Create a new project**:
Expand All @@ -43,7 +43,7 @@ To start your adventure with infrastructure-as-code with Scala follow these step
mkdir besom-demo && cd besom-demo
```
```bash
pulumi new https://github.com/VirtusLab/besom/tree/v0.2.0/templates/aws
pulumi new https://github.com/VirtusLab/besom/tree/v0.2.1/templates/aws
```

5. **Deploy to the Cloud**:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
title: Templates
---

All templates are available in [Besom GitHub repository](https://github.com/VirtusLab/besom/tree/v0.2.0/templates).
All templates are available in [Besom GitHub repository](https://github.com/VirtusLab/besom/tree/v0.2.1/templates).
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const config = {
},

customFields: {
besomVersion: '0.2.0' // TODO process.env.BESOM_VERSION
besomVersion: '0.2.1' // TODO process.env.BESOM_VERSION
},

presets: [
Expand Down
Loading

0 comments on commit c285d1e

Please sign in to comment.