matterbridge-test 0.0.1 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-mqtt and sponsoring it.
6
6
 
7
+ ## [0.0.4] - 2024-08-28
8
+
9
+ ### Added
10
+
11
+ - [Feature 1]: Description of the feature.
12
+ - [Feature 2]: Description of the feature.
13
+
14
+ <a href="https://www.buymeacoffee.com/luligugithub">
15
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
16
+ </a>
17
+
18
+ ## [0.0.2] - 2024-08-28
19
+
20
+ ### Added
21
+
22
+ - [Feature 1]: Description of the feature.
23
+ - [Feature 2]: Description of the feature.
24
+
25
+ <a href="https://www.buymeacoffee.com/luligugithub">
26
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
27
+ </a>
28
+
7
29
  ## [0.0.1] - 2024-08-28
8
30
 
9
31
  First published release.
@@ -12,6 +34,8 @@ First published release.
12
34
  <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
13
35
  </a>
14
36
 
37
+ ## [0.0.0] - 2024-08-28
38
+
15
39
  <!-- Commented out section
16
40
  ## [1.1.2] - 2024-03-08
17
41
 
package/README.md CHANGED
@@ -13,6 +13,6 @@
13
13
 
14
14
  ---
15
15
 
16
- This a bad plugin to test matterbridge.
16
+ This is a bad plugin to test matterbridge.
17
17
 
18
18
  Internal use only!
package/create-release.js CHANGED
@@ -1,6 +1,19 @@
1
1
  /* eslint-disable no-console */
2
+
3
+ /*
4
+ Add the following scripts to package.json file:
5
+ "prepublishOnly": "npm run lint && npm run test && npm run cleanBuild",
6
+ "npmPublish": "npm publish",
7
+ "gitPublish": "npm run lint && npm run test && npm run cleanBuild && node create-release.js",
8
+ "preversion": "npm run lint && npm run test && npm run cleanBuild",
9
+ "postversion": "git push && git push --tags && node create-release.js",
10
+ "version:patch": "npm version patch",
11
+ "version:minor": "npm version minor",
12
+ "version:major": "npm version major",
13
+ */
14
+
2
15
  import { execSync } from 'child_process';
3
- import { readFileSync } from 'fs';
16
+ import { readFileSync, writeFileSync, unlinkSync } from 'fs';
4
17
  import path from 'path';
5
18
  import readline from 'readline';
6
19
 
@@ -18,16 +31,23 @@ const changelog = readFileSync(changelogPath, 'utf8');
18
31
  const changelogSection = extractChangelogSection(changelog, tag);
19
32
 
20
33
  const title = `Release ${tag}`;
21
- const notes = `Release notes for version ${tag}\n\n${changelogSection}`;
34
+ const notes = `Release notes for version ${tag}\n\n## [${tag}] ${changelogSection}`;
22
35
 
23
36
  // Log the release details
24
- console.log(`Creating release with the following details:\nTitle: ${title}\nNotes:\n${notes}`);
37
+ console.log(`Creating release ${tag} with the following details:\nTitle:\n${title}\nNotes:\n${notes}`);
38
+
39
+ // Write the release notes to a temporary file
40
+ const notesFilePath = path.join(process.cwd(), 'release-notes.md');
41
+ writeFileSync(notesFilePath, notes);
25
42
 
26
43
  // Wait for user input before proceeding
27
44
  await pressAnyKey();
28
45
 
29
- // Create the release
30
- execSync(`gh release create ${tag} -t "${title}" -n "${notes}"`, { stdio: 'inherit' });
46
+ // Create the release using the temporary file
47
+ execSync(`gh release create ${tag} -t "${title}" -F "${notesFilePath}"`, { stdio: 'inherit' });
48
+
49
+ // Clean up the temporary file
50
+ unlinkSync(notesFilePath);
31
51
 
32
52
  /**
33
53
  * Extracts the relevant section from the changelog for the given tag.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-test",
3
- "version": "0.0.1",
3
+ "version": "0.0.5",
4
4
  "description": "Matterbridge test plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",
@@ -51,10 +51,12 @@
51
51
  "cleanBuild": "npm run clean && tsc",
52
52
  "deepClean": "rimraf tsconfig.tsbuildinfo package-lock.json ./dist ./node_modules",
53
53
  "deepCleanRebuild": "npm run deepClean && npm install && npm run build",
54
- "prepublishOnly": "npm run lint && npm run test && npm run cleanBuild",
55
54
  "checkDependencies": "npx npm-check-updates",
56
55
  "updateDependencies": "npx npm-check-updates -u && npm install & npm run cleanBuild",
57
- "preversion": "npm run lint && npm run test && npm run build",
56
+ "prepublishOnly": "npm run lint && npm run test && npm run cleanBuild",
57
+ "npmPublish": "npm publish",
58
+ "gitPublish": "npm run lint && npm run test && npm run cleanBuild && node create-release.js",
59
+ "preversion": "npm run lint && npm run test && npm run cleanBuild",
58
60
  "postversion": "git push && git push --tags && node create-release.js",
59
61
  "version:patch": "npm version patch",
60
62
  "version:minor": "npm version minor",
@@ -0,0 +1,12 @@
1
+ Release notes for version 0.0.4
2
+
3
+ ## [0.0.4] - 2024-08-28
4
+
5
+ ### Added
6
+
7
+ - [Feature 1]: Description of the feature.
8
+ - [Feature 2]: Description of the feature.
9
+
10
+ <a href="https://www.buymeacoffee.com/luligugithub">
11
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
12
+ </a>