Skip to content

Commit

Permalink
Merge branch 'release/8.3.0'
Browse files Browse the repository at this point in the history
Release: com.io7m.primogenitor 8.3.0
Change: Update org.apache.maven.plugins:maven-checkstyle-plugin:3.3.1 → 3.4.0
Change: Update org.apache.maven.plugins:maven-surefire-plugin:3.2.5 → 3.3.0
Change: Update org.apache.maven.plugins:maven-enforcer-plugin:3.4.1 → 3.5.0
Change: Update org.apache.maven.plugins:maven-javadoc-plugin:3.6.3 → 3.7.0
Change: Update org.apache.maven.plugins:maven-shade-plugin:3.5.3 → 3.6.0
Change: Update com.github.spotbugs:spotbugs-maven-plugin:4.8.5.0 → 4.8.6.2
Change: Update org.apache.maven.plugins:maven-jar-plugin:3.4.1 → 3.4.2
Change: Update org.apache.maven.plugins:maven-clean-plugin:3.3.2 → 3.4.0
Change: Update org.apache.maven.plugins:maven-failsafe-plugin:3.2.5 → 3.3.0
Change: Update org.scijava:scijava-maven-plugin:2.2.0 → 3.0.0
Change: Update org.apache.maven.plugins:maven-dependency-plugin:3.6.1 → 3.7.1
Change: Update org.cyclonedx:cyclonedx-maven-plugin:2.8.2 → 2.9.0.
Change: Update org.apache.maven.plugins:maven-failsafe-plugin:3.5.0 → 3.5.1.
Change: Update org.apache.maven.plugins:maven-surefire-plugin:3.5.0 → 3.5.1.
Change: Update org.ow2.asm:asm:9.7 → 9.7.1.
Change: Update junit.version:5.11.1 → 5.11.2.
Change: Update com.puppycrawl.tools:checkstyle:10.18.1 → 10.18.2.
Change: Update org.apache.maven.plugins:maven-gpg-plugin:3.2.6 → 3.2.7.
Change: Update junit.version:5.11.0 → 5.11.1.
Change: Update org.cyclonedx:cyclonedx-maven-plugin:2.8.1 → 2.8.2.
Change: Update com.github.spotbugs:spotbugs-maven-plugin:4.8.6.3 → 4.8.6.4.
Change: Update org.codehaus.mojo:extra-enforcer-rules:1.8.0 → 1.9.0.
Change: Update org.apache.maven.plugins:maven-gpg-plugin:3.2.5 → 3.2.6.
Change: Update io.github.zlika:reproducible-build-maven-plugin:0.16 → 0.17.
Change: Update com.github.spotbugs:spotbugs-maven-plugin:4.8.6.2 → 4.8.6.3.
Change: Update org.codehaus.mojo:buildnumber-maven-plugin:3.2.0 → 3.2.1.
Change: Update com.puppycrawl.tools:checkstyle:10.18.0 → 10.18.1.
Change: Update org.apache.maven.plugins:maven-deploy-plugin:3.1.2 → 3.1.3.
Change: Update org.apache.maven.plugins:maven-failsafe-plugin:3.4.0 → 3.5.0.
Change: Update org.apache.maven.plugins:maven-surefire-plugin:3.4.0 → 3.5.0.
Change: Update com.puppycrawl.tools:checkstyle:10.17.0 → 10.18.0.
Change: Update org.apache.maven.plugins:maven-javadoc-plugin:3.8.0 → 3.10.0.
Change: Update org.apache.maven.plugins:maven-failsafe-plugin:3.3.1 → 3.4.0.
Change: Update org.apache.maven.plugins:maven-surefire-plugin:3.3.1 → 3.4.0.
Change: Update org.apache.maven.plugins:maven-install-plugin:3.1.2 → 3.1.3.
Change: Update junit.version:5.10.3 → 5.11.0.
Change: Update org.codehaus.mojo:exec-maven-plugin:3.4.0 → 3.4.1.
Change: Update org.apache.maven.plugins:maven-gpg-plugin:3.2.4 → 3.2.5.
Change: Update org.codehaus.mojo:exec-maven-plugin:3.3.0 → 3.4.0.
Change: Update org.cyclonedx:cyclonedx-maven-plugin:2.8.0 → 2.8.1.
Change: Update org.apache.maven.plugins:maven-javadoc-plugin:3.7.0 → 3.8.0.
Change: Update org.apache.maven.plugins:maven-failsafe-plugin:3.3.0 → 3.3.1.
Change: Update org.apache.maven.plugins:maven-surefire-plugin:3.3.0 → 3.3.1.
Change: Update plugins.
Change: Update org.apache.maven.plugins:maven-checkstyle-plugin 3.3.1 → 3.4.0.
Change: Update org.apache.maven.plugins:maven-surefire-plugin 3.2.5 → 3.3.0.
Change: Update org.apache.maven.plugins:maven-enforcer-plugin 3.4.1 → 3.5.0.
Change: Update org.apache.maven.plugins:maven-javadoc-plugin 3.6.3 → 3.7.0.
Change: Update org.apache.maven.plugins:maven-shade-plugin 3.5.3 → 3.6.0.
Change: Update com.github.spotbugs:spotbugs-maven-plugin 4.8.5.0 → 4.8.6.2.
Change: Update org.apache.maven.plugins:maven-jar-plugin 3.4.1 → 3.4.2.
Change: Update org.apache.maven.plugins:maven-clean-plugin 3.3.2 → 3.4.0.
Change: Update org.apache.maven.plugins:maven-failsafe-plugin 3.2.5 → 3.3.0.
Change: Update org.scijava:scijava-maven-plugin 2.2.0 → 3.0.0.
Change: Update org.apache.maven.plugins:maven-dependency-plugin 3.6.1 → 3.7.1.
Change: Update com.puppycrawl.tools:checkstyle:10.16.0 → 10.17.0.
Change: Update org.apache.maven.plugins:maven-failsafe-plugin:3.2.3 → 3.2.5.
Change: Update org.apache.maven.plugins:maven-assembly-plugin:3.6.0 → 3.7.1.
Change: Update org.codehaus.mojo:extra-enforcer-rules:1.7.0 → 1.8.0.
Change: Update com.github.spotbugs:spotbugs-maven-plugin:4.8.2.0 → 4.8.5.0.
Change: Update org.apache.maven.plugins:maven-shade-plugin:3.5.1 → 3.5.3.
Change: Update org.apache.maven.plugins:maven-jar-plugin:3.3.0 → 3.4.1.
Change: Update com.puppycrawl.tools:checkstyle:10.12.7 → 10.16.0.
Change: Update org.apache.maven.plugins:maven-gpg-plugin:3.1.0 → 3.2.4.
Change: Update org.apache.maven.plugins:maven-surefire-plugin:3.2.3 → 3.2.5.
Change: Update org.codehaus.mojo:exec-maven-plugin:3.1.1 → 3.2.0.
Change: Update org.apache.maven.plugins:maven-install-plugin:3.1.1 → 3.1.2.
Change: Update org.ow2.asm:asm:9.6 → 9.7.
Change: Update org.apache.maven.plugins:maven-deploy-plugin:3.1.1 → 3.1.2.
Change: Update org.cyclonedx:cyclonedx-maven-plugin:2.7.10 → 2.8.0.
Change: Update junit.version:5.10.1 → 5.10.2.
Change: Update org.apache.maven.plugins:maven-source-plugin:3.3.0 → 3.3.1.
Change: Update org.jacoco:jacoco-maven-plugin:0.8.11 → 0.8.12.
  • Loading branch information
io7m committed Oct 17, 2024
2 parents b0ddcdc + 2cdf767 commit 0997c58
Show file tree
Hide file tree
Showing 29 changed files with 1,140 additions and 496 deletions.
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"

target-branch: "develop"
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-major" ]
Empty file removed .github/workflows-are-custom
Empty file.
1 change: 1 addition & 0 deletions .github/workflows.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ProfileName: CustomRunScript
162 changes: 162 additions & 0 deletions .github/workflows/Tools.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
/*
* Copyright © 2024 Mark Raynsford <code@io7m.com> https://www.io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.TreeMap;

public final class Tools
{
private static final TreeMap<String, OpType> OPS =
new TreeMap<>();

static {
final var opsList = List.of(
new ShowProjectVersion(),
new ShowProjectIsSnapshot()
);

for (final var op : opsList) {
OPS.put(op.name(), op);
}
}

private Tools()
{

}

private interface OpType
{
String name();

void execute(String[] args)
throws Exception;
}

private static String getProjectVersion(
final File file)
throws Exception
{
final var documentBuilders =
DocumentBuilderFactory.newInstance();
final var documentBuilder =
documentBuilders.newDocumentBuilder();
final var document =
documentBuilder.parse(file);

final var xPathFactory =
XPathFactory.newInstance();
final var xPath =
xPathFactory.newXPath();

final var nodes =
(NodeList) xPath.evaluate(
"//project/version",
document,
XPathConstants.NODESET
);

for (var i = 0; i < nodes.getLength(); i++) {
final var node = nodes.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
return node.getTextContent().trim();
}
}

throw new IOException(
"Could not locate a //project/version node!"
);
}

private static final class ShowProjectVersion implements OpType
{
ShowProjectVersion()
{

}

@Override
public String name()
{
return "ShowProjectVersion";
}

@Override
public void execute(
final String[] args)
throws Exception
{
System.out.print("IO7M_PROJECT_VERSION=");
System.out.println(getProjectVersion(new File(args[1])));
}
}

private static final class ShowProjectIsSnapshot implements OpType
{
ShowProjectIsSnapshot()
{

}

@Override
public String name()
{
return "ShowProjectIsSnapshot";
}

@Override
public void execute(
final String[] args)
throws Exception
{
System.out.print("IO7M_PROJECT_VERSION_IS_SNAPSHOT=");
System.out.println(
getProjectVersion(new File(args[1])).endsWith("-SNAPSHOT")
);
}
}

public static void main(
final String[] args)
throws Exception
{
if (args.length == 0) {
System.err.println("Usage: command");
System.exit(1);
}

final var op = OPS.get(args[0]);
if (op == null) {
System.err.println("Unrecognized command.");
System.err.println(" Must be one of:");
for (final var name : OPS.keySet()) {
System.err.print(" ");
System.err.println(name);
}
System.exit(1);
}

op.execute(args);
}
}
File renamed without changes.
2 changes: 2 additions & 0 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec mvn --errors -Dbnd.baseline.skip=true -Denforcer.skip=true clean verify
69 changes: 69 additions & 0 deletions .github/workflows/deploy-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/sh
#
# Automatically generated: DO NOT EDIT.
#
# Generation code: https://www.github.com/io7m-com/.github/
#

fatal()
{
echo "fatal: $1" 1>&2
exit 1
}

if [ -z "${MAVEN_CENTRAL_USERNAME}" ]
then
fatal "MAVEN_CENTRAL_USERNAME is not set."
fi

if [ -z "${MAVEN_CENTRAL_PASSWORD}" ]
then
fatal "MAVEN_CENTRAL_PASSWORD is not set."
fi

(cat <<EOF
<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- Enable deployment of OCI images. -->
<activeProfiles>
<activeProfile>io7m-oci-image</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>io7m</id>
<properties>
<gpg.useagent>true</gpg.useagent>
<gpg.keyname>github-ci-maven-rsa-key</gpg.keyname>
<io7m.deployment>true</io7m.deployment>
</properties>
</profile>
</profiles>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${MAVEN_CENTRAL_USERNAME}</username>
<password>${MAVEN_CENTRAL_PASSWORD}</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>${MAVEN_CENTRAL_USERNAME}</username>
<password>${MAVEN_CENTRAL_PASSWORD}</password>
</server>
</servers>
</settings>
EOF
) > "$HOME/.m2/settings.xml" || fatal "could not update $HOME/.m2/settings.xml"

exec mvn \
-Dio7m.release=true \
-Dio7m.deployment=true \
--batch-mode \
--strict-checksums \
-Denforcer.skip=true \
-DskipTests=true \
-DskipITs=true deploy
56 changes: 56 additions & 0 deletions .github/workflows/deploy-snapshot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/sh
#
# Automatically generated: DO NOT EDIT.
#
# Generation code: https://www.github.com/io7m-com/.github/
#

fatal()
{
echo "fatal: $1" 1>&2
exit 1
}

if [ -z "${MAVEN_CENTRAL_USERNAME}" ]
then
fatal "MAVEN_CENTRAL_USERNAME is not set."
fi

if [ -z "${MAVEN_CENTRAL_PASSWORD}" ]
then
fatal "MAVEN_CENTRAL_PASSWORD is not set."
fi

(cat <<EOF
<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- Enable deployment of OCI images. -->
<activeProfiles>
<activeProfile>io7m-oci-image</activeProfile>
</activeProfiles>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${MAVEN_CENTRAL_USERNAME}</username>
<password>${MAVEN_CENTRAL_PASSWORD}</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>${MAVEN_CENTRAL_USERNAME}</username>
<password>${MAVEN_CENTRAL_PASSWORD}</password>
</server>
</servers>
</settings>
EOF
) > "$HOME/.m2/settings.xml" || fatal "could not update $HOME/.m2/settings.xml"

exec mvn \
--batch-mode \
--strict-checksums \
-Denforcer.skip=true \
-DskipTests=true \
-DskipITs=true deploy
48 changes: 48 additions & 0 deletions .github/workflows/deploy.linux.temurin.lts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# Automatically generated: DO NOT EDIT.
#
# Generation code: https://www.github.com/io7m-com/.github/
# Workflow profile: Core
#

name: deploy.linux.temurin.lts

on:
push:
tags: [ com.io7m.primogenitor-* ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: JDK
uses: actions/setup-java@v4
with:
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 -v --import

- name: Log in to Quay.io.
uses: redhat-actions/podman-login@v1.7
with:
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_PASSWORD }}
registry: 'quay.io'

- name: Deploy release
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
run: .github/workflows/deploy-release.sh

Loading

0 comments on commit 0997c58

Please sign in to comment.