Skip to content

Commit

Permalink
Adapt release plugin to go wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
theotherp committed Apr 1, 2024
1 parent 4e09d79 commit 0708491
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<windowsExecutable>${basedir}/releases/windows-release/include/NZBHydra2.exe</windowsExecutable>
<windowsConsoleExecutable>${basedir}/releases/windows-release/include/NZBHydra2 Console.exe</windowsConsoleExecutable>
<py3>${basedir}/other/wrapper/nzbhydra2wrapperPy3.py</py3>
<windowsPy>${basedir}/other/wrapper/pyInstaller/windows/nzbhydra2wrapperWindows.py</windowsPy>
<goWrapper>${basedir}/other/wrapper/pyInstaller/windows/nzbhydra2wrapperWindows.py</goWrapper>
<skipExecutablesCheck>true</skipExecutablesCheck>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<windowsExecutable>${basedir}/releases/windows-release/include/NZBHydra2.exe</windowsExecutable>
<windowsConsoleExecutable>${basedir}/releases/windows-release/include/NZBHydra2 Console.exe</windowsConsoleExecutable>
<py3>${basedir}/other/wrapper/nzbhydra2wrapperPy3.py</py3>
<windowsPy>${basedir}/other/wrapper/pyInstaller/windows/nzbhydra2wrapperWindows.py</windowsPy>
<goWrapper>${basedir}/other/wrapper/pyInstaller/windows/nzbhydra2wrapperWindows.py</goWrapper>
<skipExecutablesCheck>true</skipExecutablesCheck>
</configuration>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<windowsExecutable>${basedir}/releases/windows-release/include/NZBHydra2.exe</windowsExecutable>
<windowsConsoleExecutable>${basedir}/releases/windows-release/include/NZBHydra2 Console.exe</windowsConsoleExecutable>
<py3>${basedir}/other/wrapper/nzbhydra2wrapperPy3.py</py3>
<windowsPy>${basedir}/other/wrapper/pyInstaller/windows/nzbhydra2wrapperWindows.py</windowsPy>
<goWrapper>${basedir}/other/gowrapper/base/base.go</goWrapper>

<wrapperFile1>${basedir}/releases/linux-amd64-release/include/executables/nzbhydra2</wrapperFile1>
<wrapperFile2>${basedir}/releases/windows-release/include/NZBHydra2 Console.exe</wrapperFile2>
Expand Down

0 comments on commit 0708491

Please sign in to comment.