@acalcutt/node-pre-gyp-github 1.4.5 → 1.4.8

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.
@@ -5,6 +5,7 @@ const program = require('commander');
5
5
 
6
6
  program
7
7
  .command('publish')
8
+ .storeOptionsAsProperties()
8
9
  .description('publishes the contents of .\\build\\stage\\{version} to the current version\'s GitHub release')
9
10
  .option("-r, --release", "publish immediately, do not create draft")
10
11
  .option("-s, --silent", "turns verbose messages off")
package/index.js CHANGED
@@ -61,16 +61,18 @@ module.exports = class NodePreGypGithub {
61
61
  }
62
62
 
63
63
  async createRelease(args) {
64
+ const prerelease = this.package_json.version.includes('pre');
65
+
64
66
  const options = {
65
67
  host: this.host,
66
68
  owner: this.owner,
67
69
  repo: this.repo,
68
70
  tag_name: this.package_json.version,
69
71
  target_commitish: 'main',
70
- name: 'v' + this.package_json.version,
72
+ name: 'node-v' + this.package_json.version,
71
73
  body: this.package_json.name + ' ' + this.package_json.version,
72
74
  draft: true,
73
- prerelease: false
75
+ prerelease: prerelease
74
76
  };
75
77
 
76
78
  Object.keys(args).forEach(function(key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acalcutt/node-pre-gyp-github",
3
- "version": "1.4.5",
3
+ "version": "1.4.8",
4
4
  "description": "A node-pre-gyp module which provides the ability to publish to GitHub releases.",
5
5
  "bin": "./bin/node-pre-gyp-github.js",
6
6
  "main": "index.js",