Skip to content

Commit

Permalink
Release: com.io7m.darco 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed Sep 1, 2024
2 parents 7e37484 + dbe8830 commit 9a98716
Show file tree
Hide file tree
Showing 22 changed files with 114 additions and 89 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy.linux.temurin.lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ jobs:
java-version: 21
distribution: temurin

- name: Check PGP version
run: gpg --version

- name: Import signing key
env:
PGP_SIGNING_KEY: ${{ secrets.PGP_SIGNING_KEY }}
run: echo "${PGP_SIGNING_KEY}" | gpg --import
run: echo "${PGP_SIGNING_KEY}" | gpg -v --import

- name: Log in to Quay.io.
uses: redhat-actions/[email protected]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.linux.temurin.current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ jobs:
id: project_is_snapshot
run: java .github/workflows/Tools.java ShowProjectIsSnapshot pom.xml >> "$GITHUB_OUTPUT"


- name: Build
env:
XOANON_REALLY_USE_LOCAL_DISPLAY: true
run: mvn --batch-mode --strict-checksums --errors clean verify site

- name: Upload test logs
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/main.linux.temurin.lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ jobs:
id: project_is_snapshot
run: java .github/workflows/Tools.java ShowProjectIsSnapshot pom.xml >> "$GITHUB_OUTPUT"


- name: Build
env:
XOANON_REALLY_USE_LOCAL_DISPLAY: true
run: mvn --batch-mode --strict-checksums --errors clean verify site

- name: Upload test logs
Expand All @@ -44,7 +47,7 @@ jobs:
path: ./com.io7m.darco.tests/target/surefire-reports

- name: Coverage
uses: codecov/codecov-action@v4.4.1
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: com.io7m.darco.tests/target/site/jacoco-aggregate/jacoco.xml
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.windows.temurin.current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ jobs:
id: project_is_snapshot
run: java .github/workflows/Tools.java ShowProjectIsSnapshot pom.xml >> "$GITHUB_OUTPUT"


- name: Build
env:
XOANON_REALLY_USE_LOCAL_DISPLAY: true
run: mvn --batch-mode --strict-checksums --errors clean verify site

- name: Upload test logs
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.windows.temurin.lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ jobs:
id: project_is_snapshot
run: java .github/workflows/Tools.java ShowProjectIsSnapshot pom.xml >> "$GITHUB_OUTPUT"


- name: Build
env:
XOANON_REALLY_USE_LOCAL_DISPLAY: true
run: mvn --batch-mode --strict-checksums --errors clean verify site

- name: Upload test logs
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr.linux.temurin.current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ jobs:
id: project_is_snapshot
run: java .github/workflows/Tools.java ShowProjectIsSnapshot pom.xml >> "$GITHUB_OUTPUT"


- name: Build
env:
XOANON_REALLY_USE_LOCAL_DISPLAY: true
run: mvn --batch-mode --strict-checksums --errors clean verify site

- name: Upload test logs
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr.linux.temurin.lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ jobs:
id: project_is_snapshot
run: java .github/workflows/Tools.java ShowProjectIsSnapshot pom.xml >> "$GITHUB_OUTPUT"


- name: Build
env:
XOANON_REALLY_USE_LOCAL_DISPLAY: true
run: mvn --batch-mode --strict-checksums --errors clean verify site

- name: Upload test logs
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr.windows.temurin.current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ jobs:
id: project_is_snapshot
run: java .github/workflows/Tools.java ShowProjectIsSnapshot pom.xml >> "$GITHUB_OUTPUT"


- name: Build
env:
XOANON_REALLY_USE_LOCAL_DISPLAY: true
run: mvn --batch-mode --strict-checksums --errors clean verify site

- name: Upload test logs
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr.windows.temurin.lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ jobs:
id: project_is_snapshot
run: java .github/workflows/Tools.java ShowProjectIsSnapshot pom.xml >> "$GITHUB_OUTPUT"


- name: Build
env:
XOANON_REALLY_USE_LOCAL_DISPLAY: true
run: mvn --batch-mode --strict-checksums --errors clean verify site

- name: Upload test logs
Expand Down
3 changes: 3 additions & 0 deletions README-CHANGES.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<c:changelog project="com.io7m.darco" xmlns:c="urn:com.io7m.changelog:4.0">
<c:releases>
<c:release date="2024-09-01T11:00:18+00:00" is-open="false" ticket-system="com.github.io7m.darco" version="1.0.0">
<c:changes/>
</c:release>
</c:releases>
<c:ticket-systems>
<c:ticket-system default="true" id="com.github.io7m.darco" url="https://www.github.com/io7m/darco/issues/"/>
Expand Down
2 changes: 1 addition & 1 deletion README.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The `darco` package provides a minimalist, opinionated API for database access.
* Instrumented with [OpenTelemetry](https://www.opentelemetry.io).
* [PostgreSQL](https://www.postgresql.org) support.
* [SQLite](https://www.sqlite.org) support.
* Written in pure Java 21.
* Written in pure Java 17.
* [OSGi](https://www.osgi.org/) ready
* [JPMS](https://en.wikipedia.org/wiki/Java_Platform_Module_System) ready
* ISC license
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ darco
[![Maven Central](https://img.shields.io/maven-central/v/com.io7m.darco/com.io7m.darco.svg?style=flat-square)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.io7m.darco%22)
[![Maven Central (snapshot)](https://img.shields.io/nexus/s/com.io7m.darco/com.io7m.darco?server=https%3A%2F%2Fs01.oss.sonatype.org&style=flat-square)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/io7m/darco/)
[![Codecov](https://img.shields.io/codecov/c/github/io7m-com/darco.svg?style=flat-square)](https://codecov.io/gh/io7m-com/darco)
![Java Version](https://img.shields.io/badge/21-java?label=java&color=e6c35c)
![Java Version](https://img.shields.io/badge/17-java?label=java&color=e65cc3)

![com.io7m.darco](./src/site/resources/darco.jpg?raw=true)

Expand All @@ -27,7 +27,7 @@ The `darco` package provides a minimalist, opinionated API for database access.
* Instrumented with [OpenTelemetry](https://www.opentelemetry.io).
* [PostgreSQL](https://www.postgresql.org) support.
* [SQLite](https://www.sqlite.org) support.
* Written in pure Java 21.
* Written in pure Java 17.
* [OSGi](https://www.osgi.org/) ready
* [JPMS](https://en.wikipedia.org/wiki/Java_Platform_Module_System) ready
* ISC license
Expand Down
2 changes: 1 addition & 1 deletion com.io7m.darco.api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>com.io7m.darco</artifactId>
<groupId>com.io7m.darco</groupId>
<version>1.0.0-beta0001</version>
<version>1.0.0</version>
</parent>
<artifactId>com.io7m.darco.api</artifactId>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,28 @@ public Optional<Throwable> exception()
public static DDatabaseException ofException(
final Throwable ex)
{
return switch (ex) {
case final DDatabaseException e -> {
yield e;
}

case final SStructuredErrorExceptionType<?> e -> {
yield new DDatabaseException(
e.getMessage(),
ex,
e.errorCode().toString(),
e.attributes(),
e.remediatingAction()
);
}

default -> {
yield new DDatabaseException(
Objects.requireNonNullElse(
ex.getMessage(),
ex.getClass().getSimpleName()),
ex,
"error-io",
Map.of(),
Optional.empty()
);
}
};
if (ex instanceof DDatabaseException e) {
return e;
}

if (ex instanceof SStructuredErrorExceptionType<?> e) {
return new DDatabaseException(
e.getMessage(),
ex,
e.errorCode().toString(),
e.attributes(),
e.remediatingAction()
);
}

return new DDatabaseException(
Objects.requireNonNullElse(
ex.getMessage(),
ex.getClass().getSimpleName()),
ex,
"error-io",
Map.of(),
Optional.empty()
);
}
}
2 changes: 1 addition & 1 deletion com.io7m.darco.examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>com.io7m.darco</artifactId>
<groupId>com.io7m.darco</groupId>
<version>1.0.0-beta0001</version>
<version>1.0.0</version>
</parent>
<artifactId>com.io7m.darco.examples</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion com.io7m.darco.postgres/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>com.io7m.darco</artifactId>
<groupId>com.io7m.darco</groupId>
<version>1.0.0-beta0001</version>
<version>1.0.0</version>
</parent>
<artifactId>com.io7m.darco.postgres</artifactId>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,24 +435,23 @@ private void publishTrEvent(
final Consumer<String> startupMessages,
final TrEventType event)
{
switch (event) {
case final TrEventExecutingSQL sql -> {
this.publishEvent(
startupMessages,
String.format("Executing SQL: %s", sql.statement())
);
return;
}
case final TrEventUpgrading upgrading -> {
this.publishEvent(
startupMessages,
String.format(
"Upgrading database from version %s -> %s",
upgrading.fromVersion(),
upgrading.toVersion())
);
return;
}
if (event instanceof final TrEventExecutingSQL sql) {
this.publishEvent(
startupMessages,
String.format("Executing SQL: %s", sql.statement())
);
return;
}

if (event instanceof final TrEventUpgrading upgrading) {
this.publishEvent(
startupMessages,
String.format(
"Upgrading database from version %s -> %s",
upgrading.fromVersion(),
upgrading.toVersion())
);
return;
}
}
}
2 changes: 1 addition & 1 deletion com.io7m.darco.sqlite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>com.io7m.darco</artifactId>
<groupId>com.io7m.darco</groupId>
<version>1.0.0-beta0001</version>
<version>1.0.0</version>
</parent>
<artifactId>com.io7m.darco.sqlite</artifactId>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,24 +353,23 @@ private void publishTrEvent(
final Consumer<String> startupMessages,
final TrEventType event)
{
switch (event) {
case final TrEventExecutingSQL sql -> {
this.publishEvent(
startupMessages,
String.format("Executing SQL: %s", sql.statement())
);
return;
}
case final TrEventUpgrading upgrading -> {
this.publishEvent(
startupMessages,
String.format(
"Upgrading database from version %s -> %s",
upgrading.fromVersion(),
upgrading.toVersion())
);
return;
}
if (event instanceof final TrEventExecutingSQL sql) {
this.publishEvent(
startupMessages,
String.format("Executing SQL: %s", sql.statement())
);
return;
}

if (event instanceof final TrEventUpgrading upgrading) {
this.publishEvent(
startupMessages,
String.format(
"Upgrading database from version %s -> %s",
upgrading.fromVersion(),
upgrading.toVersion())
);
return;
}
}

Expand Down
2 changes: 1 addition & 1 deletion com.io7m.darco.templating/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>com.io7m.darco</artifactId>
<groupId>com.io7m.darco</groupId>
<version>1.0.0-beta0001</version>
<version>1.0.0</version>
</parent>
<artifactId>com.io7m.darco.templating</artifactId>

Expand Down
3 changes: 2 additions & 1 deletion com.io7m.darco.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>com.io7m.darco</artifactId>
<groupId>com.io7m.darco</groupId>
<version>1.0.0-beta0001</version>
<version>1.0.0</version>
</parent>
<artifactId>com.io7m.darco.tests</artifactId>

Expand All @@ -21,6 +21,7 @@
<properties>
<checkstyle.skip>true</checkstyle.skip>
<mdep.analyze.skip>true</mdep.analyze.skip>
<enforcer.skip>true</enforcer.skip>
</properties>

<dependencies>
Expand Down
Loading

0 comments on commit 9a98716

Please sign in to comment.