Skip to content

fix: allow {basename} sidecar files with different extensions - #2648

Merged
maxandersen merged 5 commits into
jbangdev:mainfrom
maxandersen:revive-pr-1319
Aug 27, 2026
Merged

fix: allow {basename} sidecar files with different extensions#2648
maxandersen merged 5 commits into
jbangdev:mainfrom
maxandersen:revive-pr-1319

Conversation

@maxandersen

Copy link
Copy Markdown
Collaborator

Revives and rebases #1319 from @nandorholozsnyak onto current main.

Fixes #1318.

Templates may use {filename} for their primary output and {basename} for sidecar files with different extensions, for example:

{filename}=aws-lambda.java.qute
lambda-{basename}.tf=lambda.tf.qute

Extension validation now applies to the primary template output rather than every {basename} sidecar. Templates containing only {basename} entries still validate against the first entry, preserving the behavior requested in the original review.

Also updates the original tests to use the current JBang.execute() API.

Verification

  • ./gradlew test --tests dev.jbang.cli.TestInit — passes (31 tests, 1 skipped)
  • ./gradlew spotlessApply — passes
  • Full ./gradlew build reaches tests; the four failures in TestScriptDownloadVersion and TestPlugins reproduce unchanged on current main in this environment.

nandorholozsnyak and others added 5 commits August 25, 2026 10:50
- {filename} and {basename} have different validation rules for their usage
- Test for case when {basename} is being used in a template file ref
- fixes jbangdev#1318
Tests that the name given by the user matches the template
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dda2d046-0fc5-4058-b4e7-2c66de582148

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

📦 PR Build Available

Install this PR build:

curl -sL https://github.com/jbangdev/jbang-pr-builds/releases/download/pr-2648/jbang.tar | tar xf - && ./jbang/bin/jbang version

Release
| Built from 852bbb3

@maxandersen
maxandersen merged commit ea1c3dd into jbangdev:main Aug 27, 2026
30 checks passed
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.

Unable to use {basename} in template file-refs

3 participants