Support native-aware wrapper install/update flows#8
Open
realhaley wants to merge 4 commits into
Open
Conversation
- Native bundles now respect JBANG_DOWNLOAD_VERSION (consistent with generic bundles) - Added JBANG_DOWNLOAD_BASEURL support to jbang.cmd (was missing) - Fixed unreachable code in VersionChecker.retrieveLatestVersion() - Improved exception logging in native bundle fallback - Replaced Stream.forEach with for-loop (Java best practice for side effects) - Fixed continue/return bug in copyJBangFiles loop - Used Arrays.asList for Java 8 compatibility - Added cross-reference comments to keep Java/bash/PS1 implementations in sync - Documented new env vars in installation.adoc with comprehensive table - Created comprehensive test plan in docs/native-wrapper-test-plan.md All changes compile and pass spotless formatting checks.
- Remove docs/native-wrapper-test-plan.md - Remove docs/native-wrapper-testing.md Test documentation should not be in main documentation tree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes jbangdev#2458
What this changes
This PR adds a first pass at native-aware wrapper install/update behavior.
Wrapper behavior
JBANG_USE_NATIVE=true, wrapper scripts now:jbang.jarexecution if the installed bundle does not contain a native binaryNative-aware update/install path
jbang version --updateand install flow now:JBANG_USE_NATIVE=truejbang.bin(.exe).newalongsidejbang.jar.newfor existing installs.newfiles into placeConfigurable base URL
JBANG_DOWNLOAD_BASEURLto override the release base URLversion.txt)Build / CI / release bits
nativeDistZipnativeDistTarNotes
Current public releases do not yet publish the new OS/arch-specific native bundles, so wrapper fallback to generic bundles is still expected until release artifacts are wired all the way through.
This PR also adds:
docs/native-wrapper-testing.mdwith a local
file://and local HTTP testing flow for the new behavior.Tested
./gradlew -q compileJavabash -n src/main/scripts/jbangJBANG_DOWNLOAD_BASEURL=file://...