Skip to main content

Compare Current vs Previous Builds

Summary

Track structural and functional changes between component versions by comparing metadata from each build โ€” enabling changelog generation, consistency checks, and regression detection without manual audits.

๐Ÿ” What This Feature Does

JCB stores snapshot metadata for each successful compilation of a component. This data includes:

  • Build date and time
  • Line count (PHP, HTML, INI, etc.)
  • Field count
  • View count
  • Total number of files/folders generated
  • ZIP package size
  • Version number and semantic version tag
  • Blueprint checksum (unique hash per blueprint state)

With this info, JCB can compare current vs previous builds to detect differences between two compiled versions.

๐Ÿงญ Where You See It

  • Inside the Compiler summary screen (metrics for current and last build)
  • Optionally exported as metadata.json with each compiled ZIP package
  • Available as variables in the auto-generated README
  • Potential integration into external CI/CD pipelines or GitHub Actions

๐Ÿ” Use Cases

  • Automatically generate changelogs based on diffs
  • Detect blueprint changes (e.g. new fields, removed views, altered layouts)
  • Identify regressions or unexpected growth in line count or ZIP size
  • Cross-check field, file, or line counts across component versions
  • Audit development trends โ€” is your blueprint growing rapidly?

๐Ÿ›  How It Works

JCB compares metadata stored in your componentโ€™s history:

  • If using Git for blueprints, diffs are shown per commit
  • You can use the Reset / Rebuild tools to compare output
  • CLI tools or metadata exports can automate diffing across builds

๐Ÿ“˜ Pro Tip

To enable deeper comparisons:

  • Keep a changelog file with each compiled version
  • Export build metadata to Git
  • Use JCBโ€™s reset/fork system to store and compare blueprint variants

โœ… Why It Matters

Even with 100+ features, Joomla components often change subtly across versions. With automatic comparisons, JCB helps you detect:

  • Regression bugs introduced accidentally
  • Views accidentally removed or renamed
  • Line count or field inflation
  • Missed version bumps after blueprint changes

You stay informed and in control โ€” without needing to manually diff code or blueprint JSON exports.

๐Ÿ“ Conclusion

Comparison between builds is essential for quality assurance. Whether youโ€™re releasing nightly builds, maintaining stable packages, or just checking your own work โ€” this feature ensures that every JCB component evolves in a predictable and traceable way.