Skip to content

Commit

Permalink
Integrate changesets (#25)
Browse files Browse the repository at this point in the history
* Install and configure changesets

* Add changeset

* Delete custom changelog setting

* Add README with changeset usage docs
  • Loading branch information
owanturist authored Oct 31, 2024
1 parent 1e5e61f commit 7c232d6
Show file tree
Hide file tree
Showing 5 changed files with 383 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
10 changes: 10 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
"baseBranch": "origin/main",
"access": "restricted",
"commit": false,
"updateInternalDependencies": "patch",
"fixed": [],
"linked": [],
"ignore": []
}
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# SUSE Rancher Observability UI Extension

## Versioning

This project uses [Changesets](https://github.com/changesets/changesets) to manage versioning and generate changelogs.

A changeset is a markdown file that records project changes, organized into two parts:

1. **YAML Frontmatter**: Specifies the affected packages and the change type (`major`, `minor`, or `patch`).
2. **Markdown Content**: Describes the changes in more detail.

### Adding a Changeset

Run the following command to create a new changeset:

```bash
yarn changeset
```

Then, follow the prompts:

1. Select the change type (`major`, `minor`, `patch`) for each package:
- `major` for breaking changes
- `minor` for new features
- `patch` for bug fixes
2. Enter a summary of the change, which can be edited later in the generated markdown file.

This will create a new changeset file in the `.changeset` directory. Each changeset filename is a unique, randomly generated string, so do not try to make sense of it.

### Applying Changesets

To apply changesets, use:

```bash
yarn changeset version
```

This command performs the following actions:

1. Combines all outstanding changesets per package and applies the most severe change type (`major` > `minor` > `patch`) to update each package version in its `package.json`.
2. Updates each affected package’s `CHANGELOG.md` with a summary of changes.
3. Deletes the processed changeset files from the `.changeset` directory.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"serve-pkgs": "./node_modules/@rancher/shell/scripts/serve-pkgs",
"publish-pkgs": "./node_modules/@rancher/shell/scripts/extension/publish",
"parse-tag-name": "./node_modules/@rancher/shell/scripts/extension/parse-tag-name"
},
"devDependencies": {
"@changesets/cli": "^2.27.9"
}
}
Loading

0 comments on commit 7c232d6

Please sign in to comment.