Post Release 0.8.0 (#63)
* Release 0.8.0
* Clean up Nodes.drawTree
* Move deploy.sh commands into sonatype-deploy.yml
* Revert "Release 0.8.0"
This reverts commit bca3ace552
.
This commit is contained in:
parent
c7f4723e5b
commit
c2b4bcddba
3 changed files with 18 additions and 37 deletions
33
.github/deploy.sh
vendored
33
.github/deploy.sh
vendored
|
@ -1,33 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Decrypts the signing key in .github/codesigning.asc.enc
|
|
||||||
# Imports that key
|
|
||||||
# Uses .github/settings.xml and the release profile to deploy
|
|
||||||
|
|
||||||
echo "deploy.sh: Starting..."
|
|
||||||
|
|
||||||
(
|
|
||||||
cd .github
|
|
||||||
|
|
||||||
echo "Retrieving GPG Private KEY"
|
|
||||||
gpg --quiet \
|
|
||||||
--batch \
|
|
||||||
--yes \
|
|
||||||
--decrypt \
|
|
||||||
--passphrase="${GPG_PASSPHRASE}" \
|
|
||||||
--output codesigning.asc \
|
|
||||||
codesigning.asc.gpg
|
|
||||||
|
|
||||||
echo "Loading signing key"
|
|
||||||
gpg --batch \
|
|
||||||
--fast-import codesigning.asc
|
|
||||||
)
|
|
||||||
|
|
||||||
echo "Releasing..."
|
|
||||||
mvn --settings .github/settings.xml \
|
|
||||||
-Dskip-Tests=true \
|
|
||||||
-P release \
|
|
||||||
-B \
|
|
||||||
deploy
|
|
||||||
|
|
||||||
echo "deploy.sh: Done."
|
|
16
.github/workflows/sonatype-deploy.yml
vendored
16
.github/workflows/sonatype-deploy.yml
vendored
|
@ -16,7 +16,21 @@ jobs:
|
||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: mvn -B install
|
run: mvn -B install
|
||||||
- name: Nexus Repo Publish
|
- name: Nexus Repo Publish
|
||||||
run: sh .github/deploy.sh
|
run: |
|
||||||
|
gpg --quiet \
|
||||||
|
--batch \
|
||||||
|
--yes \
|
||||||
|
--decrypt \
|
||||||
|
--passphrase="${{ secrets.GPG_PASSPHRASE }}" \
|
||||||
|
--output codesigning.asc \
|
||||||
|
.github/codesigning.asc.gpg
|
||||||
|
gpg --batch \
|
||||||
|
--fast-import codesigning.asc
|
||||||
|
mvn --settings .github/settings.xml \
|
||||||
|
-Dskip-Tests=true \
|
||||||
|
-P release \
|
||||||
|
-B \
|
||||||
|
deploy
|
||||||
env:
|
env:
|
||||||
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
|
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
|
||||||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
||||||
|
|
|
@ -127,20 +127,20 @@ public final class Nodes {
|
||||||
/**
|
/**
|
||||||
* Draw a representation of the tree.
|
* Draw a representation of the tree.
|
||||||
*
|
*
|
||||||
|
* @param node the root node to draw
|
||||||
* @param depth current depth for recursion
|
* @param depth current depth for recursion
|
||||||
|
* @param <T> the type of the node's content
|
||||||
* @return a representation of the tree
|
* @return a representation of the tree
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("movevariableinsideif")
|
|
||||||
public static <T> String drawTree(
|
public static <T> String drawTree(
|
||||||
final Node<T> node,
|
final Node<T> node,
|
||||||
final int depth
|
final int depth
|
||||||
) {
|
) {
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
final String unnamed = "(unnamed)";
|
|
||||||
if (node.isNamed()) {
|
if (node.isNamed()) {
|
||||||
sb.append(formatByDepth(node.getName(), depth));
|
sb.append(formatByDepth(node.getName(), depth));
|
||||||
} else if (!node.getChildren().isEmpty()) {
|
} else if (!node.getChildren().isEmpty()) {
|
||||||
sb.append(formatByDepth(unnamed, depth));
|
sb.append(formatByDepth("(unnamed)", depth));
|
||||||
}
|
}
|
||||||
node.getChildren().forEach(c -> sb.append(drawTree(c, depth + 1)));
|
node.getChildren().forEach(c -> sb.append(drawTree(c, depth + 1)));
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|
Loading…
Reference in a new issue