Skip to content

Releases: hashicorp/copywrite

v0.25.2

24 Mar 06:06
ffab25f

Choose a tag to compare

What's Changed

New Features

  • ignore_year1 config option (#213): Added a new project.ignore_year1 boolean flag in .copywrite.hcl. When set to true, the tool skips updating the start year in existing copyright headers, preserving historically accurate start years (e.g. 2015) even when they differ from copyright_year in config. End-year logic is unaffected — files modified after their copyright end year still get the end year bumped to current year. New files with no copyright header are also unaffected and always receive the config year as the start year.

    project {
      copyright_year = 2024
    
      # Preserve original start years in existing headers
      ignore_year1 = true
    }

Bug Fixes

  • Removed unused ignore_year2 references from config, CLI, init template, and README.

Documentation

  • README updated with ignore_year1 behaviour for both source file headers and LICENSE files.
  • Init template updated to include ignore_year1 as a commented-out option.

v0.25.1

03 Mar 06:25
1ebda7a

Choose a tag to compare

Fixed

  • Fixed copyright year updates not being applied due to invalid git log format in the year update cache (#191 regression)
  • Fixed symlink resolution issue on macOS causing cache misses for file copyright year lookups
  • Improved git information caching reliability and accuracy

Details

This release fixes two critical bugs introduced in v0.25.0 (#191):

  1. The buildRepositoryCache now correctly formats git output with __CW_YEAR__= prefix, allowing the parser to properly identify years vs filenames
  2. Symlink paths are now resolved before computing relative paths, preventing cache misses on systems where /tmp is a symlink (macOS)

Users running v0.25.0 who noticed copyright year updates weren't working should upgrade to this version.

v0.25.0

12 Feb 06:23
42a6ce3

Choose a tag to compare

Improvements

  • Major Performance Optimizations (#191): Significantly improved performance by caching git repository information and reducing redundant lookups during header processing
  • Auto-Migration from HashiCorp to IBM (#189): Added automatic detection and migration of HashiCorp copyright holders to IBM format, supporting all comment styles and preserving year information

v0.24.2

05 Feb 09:16

Choose a tag to compare

v0.24.2

Bug Fixes

Fix .hbs file copyright parsing to prevent code corruption

Fixed a critical bug where the copyright detection logic was incorrectly modifying JavaScript code inside .hbs (Handlebars) template files. Previously, any indented line containing "copyright" (such as copyright: 'Copyright Acme Inc.' in JavaScript objects) was being treated as a copyright header and modified.

What changed:

  • Implemented comment block tracking for .hbs files to distinguish between actual copyright headers inside {{! ... }} comment blocks and regular code
  • Removed the generic two-space prefix from global comment detection to prevent false positives
  • Indented copyright lines are now only detected when inside handlebars {{! ... }} comment blocks

Impact:

  • .hbs files with multi-line copyright headers in {{! ... }} blocks work correctly
  • ✅ JavaScript code with "copyright" keywords (e.g., in config objects) is no longer modified
  • ✅ All other file types (.js, .go, .py, etc.) are unaffected

This fix was tested against the hashicorp/boundary-ui repository and confirmed to resolve the issue without introducing regressions.

v0.24.1

03 Feb 10:52
8df03b7

Choose a tag to compare

What's Changed

  • Fix .hbs file copyright parsing by supporting indented content by @CreatorHead in #188

v0.24.0

28 Jan 15:16
be31874

Choose a tag to compare

What's Changed

Full Changelog: v0.23.0...v0.24.0

v0.23.0

27 Jan 17:14
10cb3be

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.22.0...v0.23.0

v0.22.0

19 Mar 06:01
d5bc935

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.21.0...v0.22.0

v0.21.0

20 Feb 06:05
9d021bf

Choose a tag to compare

What's Changed

  • Handled sentinel policy scenario for copywrite header by @sonamtenzin6 in #119

New Contributors

  • @sonamtenzin6 made their first contribution in #119

Full Changelog: v0.20.0...v0.21.0

v0.20.0

24 Jan 12:28
87b93e5

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.19.0...v0.20.0