Skip to content

Add git commit info to version output (-v/-V switches)#300

Merged
fglock merged 1 commit intomasterfrom
fix/asm-crash-atan2-exists
Mar 11, 2026
Merged

Add git commit info to version output (-v/-V switches)#300
fglock merged 1 commit intomasterfrom
fix/asm-crash-atan2-exists

Conversation

@fglock
Copy link
Owner

@fglock fglock commented Mar 11, 2026

Summary

  • Unify version to 5.42.0 (replaces separate jarVersion/perlVersion)
  • Add gitCommitId and gitCommitDate fields to Configuration.java
  • Inject git info at build time (Gradle and Maven)
  • Update -v output format to match Perl:
    This is perl 5, version 42, subversion 0 (v5.42.0) built for JVM (abc123 2024-03-10)
    
  • Update -V output to show PerlOnJava section with version and git info
  • Update Configure.pl with:
    • Safer regex pattern for value matching
    • Version safety check (minor >= 40 to protect 5.10, 5.38, etc.)
    • Exclude dirs: src/main/perl/, dev/
    • Exclude files: docs/about/changelog.md
    • Targeted Config.pm updates
    • Updates jperl, jperl.bat, README.md
  • Dynamically use version in help message

Files Changed

  • Configure.pl - Version management script
  • build.gradle - Git info injection task + version update
  • pom.xml - Git info injection plugin + version update
  • jperl / jperl.bat - Launcher scripts version update
  • README.md - Feature support version
  • Configuration.java - Unified version + git fields
  • ArgumentParser.java - New -v/-V output format
  • Java files referencing old perlVersion field

Test Plan

  • ./gradlew clean shadowJar builds successfully
  • java -jar target/perlonjava-5.42.0.jar -v shows git info
  • java -jar target/perlonjava-5.42.0.jar -V shows version section
  • ./Configure.pl shows current configuration
  • ./Configure.pl -D version=5.10.0 fails (safety check)
  • ./Configure.pl -D version=5.43.0 updates all files correctly
  • ./gradlew test passes

Generated with Devin

@fglock fglock force-pushed the fix/asm-crash-atan2-exists branch 5 times, most recently from 3eda248 to 9a51919 Compare March 11, 2026 10:29
- Unify version to 5.42.0 (replaces separate jarVersion/perlVersion)
- Add gitCommitId and gitCommitDate fields to Configuration.java
- Inject git info at build time (Gradle and Maven)
- Update -v output format to match Perl:
  "This is perl 5, version 42, subversion 0 (v5.42.0) built for JVM (abc123 2024-03-10)"
- Update -V output to show PerlOnJava section with version and git info
- Update Configure.pl:
  - Safer regex pattern for value matching
  - Version safety check (minor >= 40 to protect 5.10, 5.38, etc.)
  - Exclude dirs: src/main/perl/, dev/
  - Exclude files: docs/about/changelog.md
  - Targeted Config.pm updates (paths, compatibility checks only)
- Dynamically use version in help message

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <noreply@cognition.ai>
@fglock fglock force-pushed the fix/asm-crash-atan2-exists branch from 9a51919 to 7997a71 Compare March 11, 2026 10:47
@fglock fglock merged commit 6a1da0f into master Mar 11, 2026
2 checks passed
@fglock fglock deleted the fix/asm-crash-atan2-exists branch March 11, 2026 11:02
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.

1 participant