Skip to content

Commit

Permalink
Merge pull request #380 from it-at-m/beta
Browse files Browse the repository at this point in the history
Release Hotfix
  • Loading branch information
FabianWilms authored Jan 15, 2025
2 parents 8efec8f + d82f744 commit cdd4f40
Show file tree
Hide file tree
Showing 8 changed files with 671 additions and 188 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ module.exports = {
parserOptions: {
ecmaVersion: "latest",
},
ignorePatterns: ["/storybook-static", "/dist"], // Ignoriere die Ordner foo und bar
ignorePatterns: ["/storybook-static", "/dist", "/build"], // Ignoriere die Ordner foo und bar
};
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
dist
public
storybook-static
build

# Files
package.json
Expand Down
17 changes: 10 additions & 7 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
const { promisify } = require("util");
const dateFormat = require("dateformat");
const { join } = require("node:path");
const { join, resolve } = require("node:path");
const readFileAsync = promisify(require("fs").readFile);

const TEMPLATE_DIR =
const releaseNotesTemplatePath = resolve(__dirname, "build/release-notes.hbs");
const commitTemplateDir =
"node_modules/semantic-release-gitmoji/lib/assets/templates";
// the *.hbs template and partials should be passed as strings of contents
const template = readFileAsync(join(TEMPLATE_DIR, "default-template.hbs"));
const commitTemplate = readFileAsync(join(TEMPLATE_DIR, "commit-template.hbs"));

const releaseNotesTemplate = readFileAsync(releaseNotesTemplatePath);
const commitTemplate = readFileAsync(
join(commitTemplateDir, "commit-template.hbs")
);

module.exports = {
branches: [
Expand All @@ -31,10 +34,10 @@ module.exports = {
releaseRules: {
major: [":boom:"],
minor: [":sparkles:"],
patch: [":bug:", ":ambulance:", ":lock:", ":lipstick:"],
patch: [":bug:", ":ambulance:", ":lock:", ":lipstick:", "arrow_up"],
},
releaseNotes: {
template,
template: releaseNotesTemplate,
partials: { commitTemplate },
helpers: {
datetime: function (format = "UTC:yyyy-mm-dd") {
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ This project uses [semantic-release](https://github.com/semantic-release/semanti

It follows [gitmoji commit conventions](https://gitmoji.dev/). For example:

| gitmoji | Sample Commit message | Release type |
|-------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|---------------|
| :lipstick: :lock: :ambulance: :bug: | `:lipstick` / `:lock:` / `:ambulance:` / `:bug: stop graphite breaking when too much pressure applied` | Patch Release |
| :sparkles: | `:sparkles: add 'graphiteWidth' option` | Minor Release |
| :boom: | `:boom: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | Major Release |
| gitmoji | Sample Commit message | Release type |
|------------------------------------------------|------------------------------------------------------------------------------------------|---------------|
| :lipstick: :lock: :ambulance: :bug: :arrow_up: | `:lipstick` / `:lock:` / `:ambulance:` / `:bug:` / `:arrow_up: some cool commit message` | Patch Release |
| :sparkles: | `:sparkles: some new feature added` | Minor Release |
| :boom: | `:boom: some breaking change happened.`<br>` Here is how to fix it: ` | Major Release |

## License

Expand Down
58 changes: 58 additions & 0 deletions build/release-notes.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{{#if compareUrl}}
# [v{{nextRelease.version}}]({{compareUrl}}) ({{datetime "UTC:yyyy-mm-dd"}})
{{else}}
# v{{nextRelease.version}} ({{datetime "UTC:yyyy-mm-dd"}})
{{/if}}

{{#with commits}}

{{#if boom}}
## πŸ’₯ Breaking Changes
{{#each boom}}
- {{> commitTemplate}}
{{/each}}
{{/if}}

{{#if sparkles}}
## ✨ New Features
{{#each sparkles}}
- {{> commitTemplate}}
{{/each}}
{{/if}}

{{#if ambulance}}
## πŸš‘ Critical Hotfixes
{{#each ambulance}}
- {{> commitTemplate}}
{{/each}}
{{/if}}

{{#if bug}}
## πŸ› Bug Fixes
{{#each bug}}
- {{> commitTemplate}}
{{/each}}
{{/if}}

{{#if lipstick}}
## πŸ’„ Design Fixes and Updates
{{#each lipstick}}
- {{> commitTemplate}}
{{/each}}
{{/if}}

{{#if lock}}
## πŸ”’ Security Issues
{{#each lock}}
- {{> commitTemplate}}
{{/each}}
{{/if}}

{{#if arrow_up}}
## ⬆️ Dependency Upgrade
{{#each arrow_up}}
- {{> commitTemplate}}
{{/each}}
{{/if}}

{{/with}}
Loading

0 comments on commit cdd4f40

Please sign in to comment.