# Changelog Fragments

This directory contains changelog fragments to avoid merge conflicts when multiple people are working on 
different features.

## Structure

```
changelog.d/
  1.12.0-unreleased/    # Unreleased changes for version 1.12.0
    fix-1234.md         # Individual changelog entries
    feature-5678.md
  1.11.0/               # Released version
    fix-9999.md
    released.yaml       # Marks this version as released
```

## Creating a new changelog entry

1. Create a new file in the appropriate version directory (e.g., `changelog.d/1.12.0-unreleased/`)
2. Name the file descriptively, typically `{type}-{issue-number}.md` (e.g., `fix-1234.md`, `feature-5678.md`)
3. Use one of these prefixes:
   - `breaking-` - Breaking changes
   - `feature-` or `enhancement-` - New features or enhancements
   - `fix-` - Bug fixes
   - `minor-` - Minor changes

## File format

Each changelog fragment should be a markdown file containing the changelog entry text:

```markdown
The classifier functions feature has been removed. (GL#1570)
```

or for multi-line entries:

```markdown
Minor performance improvements for TIFF files: (GL#1525)
- Another layer of caching that benefits all-intersections or for
  features that are geographically close.
- Minor improvement for tile lookups that benefits all TIFF sampling operations.
```

**Important**: Do NOT include the category heading (like `### Fixes`) - this will be added automatically by the build script based on the filename prefix.

## Building the changelog

Run the build script to generate a complete CHANGELOG.md:

```bash
./bin/build-changelog.rb
```

This will:
1. Read all changelog fragments from `changelog.d/`
2. Group them by category (Breaking, Enhancements, Fixes, Minor)
4. Write the result to STDOUT

## Releasing a version

Note that the changelog.d/unreleased directory needs to be renamed when producing a
RiskScape engine release. Refer to the top-level README.md release instructions for more details.


