Socket
Socket
Sign inDemoInstall

node-pre-gyp-github

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-pre-gyp-github - npm Package Compare versions

Comparing version 1.0.6 to 1.1.0

15

bin/node-pre-gyp-github.js

@@ -7,7 +7,10 @@ #!/usr/bin/env node

program
.command('publish')
.command('publish [options]')
.description('publish the contents of .\\bin\\stage to the current version\'s GitHub release')
.action(function() {
var x = new module();
x.publish();
.option("-r, --release", "publish immediately, do not create draft")
.action(function(cmd, options){
var opts = {},
x = new module();
opts.draft = options.release ? false : true;
x.publish(opts);
});

@@ -25,1 +28,5 @@

program.parse(process.argv);
if (!program.args.length) {
program.help();
}

@@ -59,6 +59,5 @@ "use strict";

NodePreGypGithub.prototype.createRelease = function(callback) {
this.github.authenticate(this.authenticate_settings());
this.github.releases.createRelease({
'owner': this.owner,
NodePreGypGithub.prototype.createRelease = function(args, callback) {
var options = {
'owner': options.owner || this.owner,
'repo': this.repo,

@@ -71,3 +70,10 @@ 'tag_name': this.package_json.version,

'prerelease': false
}, callback);
};
Object.keys(args).forEach(function(key) {
options[key] = args[key] || options[key];
});
this.github.authenticate(this.authenticate_settings());
this.github.releases.createRelease(options, callback);
};

@@ -112,3 +118,3 @@

NodePreGypGithub.prototype.publish = function() {
NodePreGypGithub.prototype.publish = function(options) {
this.init();

@@ -134,3 +140,3 @@ this.github.authenticate(this.authenticate_settings());

if(!release.length) {
this.createRelease(function(err, release) {
this.createRelease(options, function(err, release) {
this.release = release;

@@ -137,0 +143,0 @@ console.log('Release ' + this.package_json.version + " not found, so a draft release was created. YOU MUST MANUALLY PUBLISH THIS DRAFT WITHIN GITHUB FOR IT TO BE ACCESSIBLE.");

{
"name": "node-pre-gyp-github",
"version": "1.0.6",
"version": "1.1.0",
"description": "A node-pre-gyp module which provides the ability to publish to GitHub releases.",

@@ -30,3 +30,3 @@ "bin": "./bin/node-pre-gyp-github.js",

"mime": "^1.3.4",
"request": "^2.65.0"
"request": "^2.67.0"
},

@@ -33,0 +33,0 @@ "author": "Bill Christo",

# node-pre-gyp-github
##### A node-pre-gyp module which provides the ability to publish to GitHub releases instead of Amazon S3 or some other cloud host.
##### A node-pre-gyp module which provides the ability to publish to GitHub releases.
##Usage
## Usage
Instead of ```node-pre-gyp publish``` use **```node-pre-gyp-github publish```**
## Options
* --release : Publish the GitHub Release immediately instead of creating a Draft.
ex. ```node-pre-gyp-github publish --release```
## Install

@@ -13,3 +18,3 @@ ```javascript

## Configuration
This module is intented to be used with node-pre-gyp. Therefore, be sure to configure and install node-pre-gyp first. After having done that, within **```package.json```** update the ```binary``` property ```host``` so it matches the following format:
This module is intended to be used with node-pre-gyp. Therefore, be sure to configure and install node-pre-gyp first. After having done that, within **```package.json```** update the ```binary``` property ```host``` so it matches the following format:

@@ -38,3 +43,3 @@ ```

## Example
## Example (Publish to GitHub as a Draft Release)
1. node-pre-gyp configure

@@ -44,1 +49,7 @@ 2. node-pre-gyp build

4. node-pre-gyp-github publish
## Example (Publish to GitHub as a Release)
1. node-pre-gyp configure
2. node-pre-gyp build
3. node-pre-gyp package
4. node-pre-gyp-github publish --release
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc