From 0708491b6cc274813e1ecaadd55daccfbdcb658c Mon Sep 17 00:00:00 2001 From: TheOtherP Date: Mon, 1 Apr 2024 10:44:42 +0200 Subject: [PATCH] Adapt release plugin to go wrapper --- .../nzbhydra/github/mavenreleaseplugin/ReleaseMojo.java | 8 ++++---- .../github/mavenreleaseplugin/PrecheckMojoTest.java | 4 ++-- .../pomWithChangelogWrongLatestEntry.xml | 2 +- .../github/mavenreleaseplugin/pomWithTokenFile.xml | 2 +- pom.xml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/other/github-release-plugin/src/main/java/org/nzbhydra/github/mavenreleaseplugin/ReleaseMojo.java b/other/github-release-plugin/src/main/java/org/nzbhydra/github/mavenreleaseplugin/ReleaseMojo.java index 662836790..0da431202 100644 --- a/other/github-release-plugin/src/main/java/org/nzbhydra/github/mavenreleaseplugin/ReleaseMojo.java +++ b/other/github-release-plugin/src/main/java/org/nzbhydra/github/mavenreleaseplugin/ReleaseMojo.java @@ -75,8 +75,8 @@ public class ReleaseMojo extends AbstractMojo { protected File windowsConsoleExecutable; @Parameter(property = "py3", required = false) protected File py3; - @Parameter(property = "windowsPy", required = false) - protected File windowsPy; + @Parameter(property = "goWrapper", required = false) + protected File goWrapper; @Parameter(property = "skipExecutablesCheck", required = false) protected boolean skipExecutablesCheck; @@ -181,11 +181,11 @@ protected void executePrechecks() throws MojoExecutionException { final Instant windowsExecutableCreationTime = Files.readAttributes(windowsExecutable.toPath(), BasicFileAttributes.class).creationTime().toInstant(); final Instant windowsConsoleExecutableCreationTime = Files.readAttributes(windowsConsoleExecutable.toPath(), BasicFileAttributes.class).creationTime().toInstant(); final Instant py3CreationTime = Files.readAttributes(py3.toPath(), BasicFileAttributes.class).creationTime().toInstant(); - final Instant windowsPyCreationTime = Files.readAttributes(windowsPy.toPath(), BasicFileAttributes.class).creationTime().toInstant(); + final Instant goWrapperCreationTime = Files.readAttributes(goWrapper.toPath(), BasicFileAttributes.class).creationTime().toInstant(); verifyIsYounger(linuxAmd64Executable, py3); // verifyIsYounger(linuxArm64Executable, py3); verifyIsYounger(windowsExecutable, py3); - verifyIsYounger(windowsExecutable, windowsPy); + verifyIsYounger(windowsExecutable, goWrapper); verifyIsYounger(windowsConsoleExecutable, py3); } catch (IOException e) { throw new RuntimeException(e); diff --git a/other/github-release-plugin/src/test/java/org/nzbhydra/github/mavenreleaseplugin/PrecheckMojoTest.java b/other/github-release-plugin/src/test/java/org/nzbhydra/github/mavenreleaseplugin/PrecheckMojoTest.java index 7ac1f2e1e..2c30eadfc 100644 --- a/other/github-release-plugin/src/test/java/org/nzbhydra/github/mavenreleaseplugin/PrecheckMojoTest.java +++ b/other/github-release-plugin/src/test/java/org/nzbhydra/github/mavenreleaseplugin/PrecheckMojoTest.java @@ -38,8 +38,8 @@ public void testThatExecutableTimesAreChecked() throws Exception { IOUtils.write("py3", new FileWriter(precheckMojo.py3)); Thread.sleep(10); - precheckMojo.windowsPy = Files.createTempFile("hydra", "executable").toFile(); - IOUtils.write("windowsPy", new FileWriter(precheckMojo.windowsPy)); + precheckMojo.goWrapper = Files.createTempFile("hydra", "executable").toFile(); + IOUtils.write("goWrapper", new FileWriter(precheckMojo.goWrapper)); Thread.sleep(10); precheckMojo.windowsExecutable = Files.createTempFile("hydra", "executable").toFile(); diff --git a/other/github-release-plugin/src/test/resources/org/nzbhydra/github/mavenreleaseplugin/pomWithChangelogWrongLatestEntry.xml b/other/github-release-plugin/src/test/resources/org/nzbhydra/github/mavenreleaseplugin/pomWithChangelogWrongLatestEntry.xml index 29d47b1f5..35425352f 100644 --- a/other/github-release-plugin/src/test/resources/org/nzbhydra/github/mavenreleaseplugin/pomWithChangelogWrongLatestEntry.xml +++ b/other/github-release-plugin/src/test/resources/org/nzbhydra/github/mavenreleaseplugin/pomWithChangelogWrongLatestEntry.xml @@ -24,7 +24,7 @@ ${basedir}/releases/windows-release/include/NZBHydra2.exe ${basedir}/releases/windows-release/include/NZBHydra2 Console.exe ${basedir}/other/wrapper/nzbhydra2wrapperPy3.py - ${basedir}/other/wrapper/pyInstaller/windows/nzbhydra2wrapperWindows.py + ${basedir}/other/wrapper/pyInstaller/windows/nzbhydra2wrapperWindows.py true diff --git a/other/github-release-plugin/src/test/resources/org/nzbhydra/github/mavenreleaseplugin/pomWithTokenFile.xml b/other/github-release-plugin/src/test/resources/org/nzbhydra/github/mavenreleaseplugin/pomWithTokenFile.xml index 9496210e7..b50f2f960 100644 --- a/other/github-release-plugin/src/test/resources/org/nzbhydra/github/mavenreleaseplugin/pomWithTokenFile.xml +++ b/other/github-release-plugin/src/test/resources/org/nzbhydra/github/mavenreleaseplugin/pomWithTokenFile.xml @@ -24,7 +24,7 @@ ${basedir}/releases/windows-release/include/NZBHydra2.exe ${basedir}/releases/windows-release/include/NZBHydra2 Console.exe ${basedir}/other/wrapper/nzbhydra2wrapperPy3.py - ${basedir}/other/wrapper/pyInstaller/windows/nzbhydra2wrapperWindows.py + ${basedir}/other/wrapper/pyInstaller/windows/nzbhydra2wrapperWindows.py true diff --git a/pom.xml b/pom.xml index c13b7ab72..616cc5e62 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ ${basedir}/releases/windows-release/include/NZBHydra2.exe ${basedir}/releases/windows-release/include/NZBHydra2 Console.exe ${basedir}/other/wrapper/nzbhydra2wrapperPy3.py - ${basedir}/other/wrapper/pyInstaller/windows/nzbhydra2wrapperWindows.py + ${basedir}/other/gowrapper/base/base.go ${basedir}/releases/linux-amd64-release/include/executables/nzbhydra2 ${basedir}/releases/windows-release/include/NZBHydra2 Console.exe