Skip to content

Commit

Permalink
🚀Preview Release - v1.0.0-preview.3 (#30)
Browse files Browse the repository at this point in the history
* release: update version to v1.0.0-preview.3

* release: create release notes for version v1.0.0-preview.3

* release: improve the release notes

* ide: add code snippets for release notes

* config: remove old settings

* chore: set json spacing to 4

* chore: create json schema files for all settings

* config: improve json layout and rename prop

* config: add schema reference to setting files

* chore: add schema prop to generated settings

* config: fix settings
  • Loading branch information
CalvinWilkinson committed Jun 26, 2024
1 parent e24aef2 commit dda9274
Show file tree
Hide file tree
Showing 17 changed files with 354 additions and 123 deletions.
51 changes: 51 additions & 0 deletions .vscode/release-notes.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
// Place your Release Notes workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }

"Issue Link": {
"scope": "markdown",
"prefix": "issue-link",
"body": [
"[#${1:Issue #}](https://github.com/KinsonDigital/kd-admin/issues/${1:Issue #}) - "
],
"description": "Link to an issue"
},
"PR Link": {
"scope": "markdown",
"prefix": "pr-link",
"body": [
"[#${1:PR #}](https://github.com/KinsonDigital/kd-admin/pull/${1:PR #}) - "
],
"description": "Link to a pull request"
},
"Issue Dependency Update": {
"scope": "markdown",
"prefix": "issue-dep-update",
"body": [
"[#${1:Issue #}](https://github.com/KinsonDigital/kd-admin/issues/${1:Issue #}) - Updated **${2:packge name}** from _**v${3:from version}**_ to _**v${4:to version}**_"
],
"description": "Link to an issue for a dependency update."
},
"PR Dependency Update": {
"scope": "markdown",
"prefix": "pr-dep-update",
"body": [
"[#${1:PR #}](https://github.com/KinsonDigital/kd-admin/pull/${1:PR #}) - Updated **${2:packge name}** from _**v${3:from version}**_ to _**v${4:to version}**_"
],
"description": "Link to a pull request for a dependency update."
}
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"msbuild",
"msvc",
"Prepper",
"RELEASETYPE",
"REPONAME",
"setx",
"sixlabors",
Expand Down
6 changes: 0 additions & 6 deletions create-pr-settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v1.0.0-preview.2",
"version": "v1.0.0-preview.3",
"tasks": {
"build": "./.github/cicd/scripts/deno-build.ts",
"tests": "deno test ./Tests/*Tests.ts"
Expand Down
6 changes: 2 additions & 4 deletions dev-tools/create-pr-settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/KinsonDigital/kd-admin/preview/schemas/create-pr-schema.json",
"ownerName": "KinsonDigital",
"repoName": "kd-admin",
"githubTokenEnvVarName": "CICD_TOKEN",
"baseBranches": [
"main",
"preview"
]
"baseBranches": [ "main", "preview"]
}
13 changes: 7 additions & 6 deletions dev-tools/prepare-release-settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/KinsonDigital/kd-admin/preview/schemas/prepare-release-schema.json",
"ownerName": "KinsonDigital",
"repoName": "kd-admin",
"orgProjectName": "KD-Team",
Expand All @@ -10,8 +11,8 @@
"headBranch": "prev-release",
"baseBranch": "preview",
"genReleaseSettingsFilePath": "./dev-tools/prev-gen-release-notes-settings.json",
"releaseNotesDirPath": "./ReleaseNotes",
"releasePrTemplateFilePath": "./ReleaseNotes",
"releaseNotesDirPath": "./release-notes",
"releasePrTemplateFilePath": "./templates/prev-prepare-release-template.md",
"releaseLabels": [
"🚀preview-release"
],
Expand All @@ -22,14 +23,14 @@
"reviewer": "KinsonDigitalAdmin",
"assignee": "CalvinWilkinson",
"headBranch": "prod-release",
"baseBranch": "preview",
"baseBranch": "main",
"genReleaseSettingsFilePath": "./dev-tools/prod-gen-release-notes-settings.json",
"releaseNotesDirPath": "./release-notes",
"releasePrTemplateFilePath": "./release-notes",
"releasePrTemplateFilePath": "./templates/prod-prepare-release-template.md",
"releaseLabels": [
"🚀preview-release"
"🚀production-release"
],
"prTitle": "🚀Preview Release (${VERSION})"
"prTitle": "🚀Production Release (${VERSION})"
}
],
"githubTokenEnvVarName": "CICD_TOKEN",
Expand Down
11 changes: 6 additions & 5 deletions dev-tools/prev-gen-release-notes-settings.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"$schema": "https://raw.githubusercontent.com/KinsonDigital/kd-admin/preview/schemas/gen-release-notes-schema.json",
"ownerName": "KinsonDigital",
"repoName": "kd-admin",
"githubTokenEnvVarName": "CICD_TOKEN",
"milestoneName": "${VERSION}",
"headerText": "${REPONAME} ${ENVIRONMENT} Release Notes - ${VERSION}",
"environment": "Preview",
"headerText": "${REPONAME} ${RELEASETYPE} Release Notes - ${VERSION}",
"releaseType": "Preview",
"extraInfo": {
"title": "Quick Reminder",
"text": "As with all software, there is always a chance for issues and bugs, especially for preview releases, so your input is greatly appreciated. 🙏🏼"
},
"emojisToRemoveFromTitle": ["🚧", "🐛", "", "🚀", "🧪", "🔬"],
"issueCategoryLabelMappings": {
"New Features ✨": "new-feature",
"Enhancements ": "enhancement",
"Bug Fixes 🐛": "bug",
"New Features ✨": "new-feature",
"Enhancements 💎": "💎enhancement",
"Bug Fixes 🐛": "🐛bug",
"Breaking Changes 🧨": "🧨breaking-changes",
"Dependency Updates 📦": "📦dependency-update"
},
Expand Down
11 changes: 6 additions & 5 deletions dev-tools/prod-gen-release-notes-settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/KinsonDigital/kd-admin/preview/schemas/gen-release-notes-schema.json",
"ownerName": "KinsonDigital",
"repoName": "kd-admin",
"githubTokenEnvVarName": "CICD_TOKEN",
"milestoneName": "${VERSION}",
"headerText": "${REPONAME} ${ENVIRONMENT} Release Notes - ${VERSION}",
"environment": "Production",
"headerText": "${REPONAME} ${RELEASETYPE} Release Notes - ${VERSION}",
"releaseType": "Production",
"emojisToRemoveFromTitle": ["🚧", "🐛", "", "🚀", "🧪", "🔬"],
"issueCategoryLabelMappings": {
"New Features ✨": "new-feature",
"Enhancements ": "enhancement",
"Bug Fixes 🐛": "bug",
"New Features ✨": "new-feature",
"Enhancements 💎": "💎enhancement",
"Bug Fixes 🐛": "🐛bug",
"Breaking Changes 🧨": "🧨breaking-changes",
"Dependency Updates 📦": "📦dependency-update"
},
Expand Down
60 changes: 0 additions & 60 deletions gen-release-notes-settings.json

This file was deleted.

21 changes: 18 additions & 3 deletions installation/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ if (existsSync(`./dev-tools/${createPrSettingsFileName}`, { isFile: true })) {
baseBranches: []
};

Deno.writeTextFileSync(`./dev-tools/${createPrSettingsFileName}`, `${JSON.stringify(prSettings, null, 2)}\n`);
const settingsObj = {
$schema: "https://raw.githubusercontent.com/KinsonDigital/kd-admin/preview/schemas/create-pr-schema.json",
...prSettings
};

Deno.writeTextFileSync(`./dev-tools/${createPrSettingsFileName}`, `${JSON.stringify(settingsObj, null, 4)}\n`);
console.log(`%c\tCreated '${createPrSettingsFileName}' file.`, "color: gray");
}
}
Expand Down Expand Up @@ -108,7 +113,12 @@ if (existsSync(`./dev-tools/${prepareReleaseSettingsFileName}`, { isFile: true }
versionFilePath: "",
};

Deno.writeTextFileSync(`./dev-tools/${prepareReleaseSettingsFileName}`, `${JSON.stringify(prepareReleaseSettings, null, 2)}\n`);
const settingsObj = {
$schema: "https://raw.githubusercontent.com/KinsonDigital/kd-admin/preview/schemas/prepare-release-schema.json",
...prepareReleaseSettings,
};

Deno.writeTextFileSync(`./dev-tools/${prepareReleaseSettingsFileName}`, `${JSON.stringify(settingsObj, null, 4)}\n`);
console.log(`%c\tCreated '${prepareReleaseSettingsFileName}' file.`, "color: gray");
}
}
Expand Down Expand Up @@ -142,7 +152,12 @@ if (existsSync(`./dev-tools/${generateReleaseSettingsFileName}`, { isFile: true
otherCategoryName: "",
};

Deno.writeTextFileSync(`./dev-tools/${generateReleaseSettingsFileName}`, `${JSON.stringify(genReleaseSettings, null, 2)}\n`);
const settingsObj = {
$schema: "https://raw.githubusercontent.com/KinsonDigital/kd-admin/preview/schemas/gen-release-notes-schema.json",
...genReleaseSettings,
};

Deno.writeTextFileSync(`./dev-tools/${generateReleaseSettingsFileName}`, `${JSON.stringify(settingsObj, null, 4)}\n`);
console.log(`%c\tCreated '${generateReleaseSettingsFileName}' file.`, "color: gray");
}
}
Expand Down
32 changes: 0 additions & 32 deletions prepare-release-settings.json

This file was deleted.

23 changes: 23 additions & 0 deletions release-notes/preview-releases/v1.0.0-preview.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<h1 align="center" style="color: mediumseagreen;font-weight: bold;">
kd-admin Preview Release Notes - v1.0.0-preview.3
</h1>

<h2 align="center" style="font-weight: bold;">Quick Reminder</h2>

<div align="center">

As with all software, there is always a chance for issues and bugs, especially for preview releases, so your input is greatly appreciated. 🙏🏼
</div>

<h2 align="center" style="font-weight: bold;">Enhancements ✨</h2>

1. [#27](https://github.com/KinsonDigital/kd-admin/issues/27) - Moved the location of the settings files when installing the tool to the _**./dev-tools**_ directory.
   - The tool now looks for the settings files in this directory.
1. [#26](https://github.com/KinsonDigital/kd-admin/issues/26) - Improved release note generation settings.

<h2 align="center" style="font-weight: bold;">Breaking Changes 🧨</h2>

1. [#27](https://github.com/KinsonDigital/kd-admin/issues/27) - Changed where the tool looks and expects the settings.
   - When upgrading, you must move any current settings to the _**./dev-tools**_ directory relative to the repository root directory.
   - Remember to update any path-related settings.
2. [#26](https://github.com/KinsonDigital/kd-admin/issues/26) - Changed the name of the `environment` setting to the name `releaseType`.
28 changes: 28 additions & 0 deletions schemas/create-pr-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ownerName": {
"type": "string",
"description": "The owner of the GitHub repository."
},
"repoName": {
"type": "string",
"description": "The name of the GitHub repository."
},
"githubTokenEnvVarName": {
"type": "string",
"description": "The name of the environment variable that contains the GitHub token for the tool to use."
},
"baseBranches": {
"type": "array",
"description": "The owner of the GitHub repository.",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"required": ["ownerName", "repoName", "githubTokenEnvVarName", "baseBranches"]
}
Loading

0 comments on commit dda9274

Please sign in to comment.