Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring: boot.exe on windows and cache for installed tools #58

Merged
merged 3 commits into from
Jul 20, 2022

Conversation

DeLaGuardo
Copy link
Owner

@DeLaGuardo DeLaGuardo commented Jul 18, 2022

closes #57
closes #6

Added pre and post execution steps to cache installed tools.

@DeLaGuardo DeLaGuardo force-pushed the boot-on-windows branch 5 times, most recently from 9cce993 to 517277b Compare July 18, 2022 10:48
src/boot.ts Outdated
})
if (utils.isWindows()) {
await exec.exec(
`reg add "HKLM\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.8" /v JAVAHome /d "$env:JAVA_HOME" /f`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully, Java versions can be quite safely extracted from JAVA_HOME

Copy link
Owner Author

@DeLaGuardo DeLaGuardo Jul 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I count on that as well, but right now I tried to make it work with at least one known JDK without success

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this can be caused by version mismatch:

This application requires a Java Runtime Environment 1.7.0
                                                     ^^^^^

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most likely, this message coming from Launch4j where the minimum JRE is set to 1.7.0, so everything above that should work

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, it works, but for some reason, the workaround must be a part of the workflow. I'll try it this evening to check what is missing when using exec(...) inside of the action.

@DeLaGuardo DeLaGuardo force-pushed the boot-on-windows branch 11 times, most recently from 4e0320f to 4b41749 Compare July 18, 2022 13:27
@zharinov
Copy link
Contributor

zharinov commented Jul 19, 2022

FYI most of pre/post handler usages I've found prefer to use same entrypoint and dispatch based on current stage. The alternative is figuring out how to build 3 different js files as entrypoints.

UPD. Though your approach looks also nice, here is my take: https://github.com/zharinov/setup-clojure/blob/test-pre-post/src/entrypoint.ts

@DeLaGuardo DeLaGuardo changed the title Test boot.exe on windows Refactoring: boot.exe on windows and cache for installed tools Jul 19, 2022
@DeLaGuardo DeLaGuardo marked this pull request as ready for review July 19, 2022 13:54
@DeLaGuardo
Copy link
Owner Author

FYI most of pre/post handler usages I've found prefer to use same entrypoint and dispatch based on current stage. The alternative is figuring out how to build 3 different js files as entrypoints.

UPD. Though your approach looks also nice, here is my take: https://github.com/zharinov/setup-clojure/blob/test-pre-post/src/entrypoint.ts

Nice! It looks much better than building separated scripts. I'll give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

boot support for MS-Windows Are downloads cached?
2 participants