Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deploy-gh

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deploy-gh - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

README.md

23

index.js

@@ -20,9 +20,24 @@ #!/usr/bin/env node

shell.exec('git checkout -');
var repoInfo = shell.exec('git remote show -n origin', {silent: true})
// Figure out the user and project name for this repo.
var url = shell.exec('git remote show -n origin', {silent: true})
.grep('Push')
.match(/https:..github.com\/([^./]+)\/([^./]+).*/);
.replace(/^\s+Push\s+URL:\s+/, '')
.trim();
var repoInfo;
if (url.match(/^https/)) {
repoInfo = url.match(/https:..github.com\/([^./]+)\/([^./]+).*/);
} else if (url.match(/^git/)) {
repoInfo = url.match(/git@github.com:([^/]+)\/([^.]+)\..*/);
} else {
console.warn('Unknown origin pattern: "' + url + '"');
shell.exit(0);
}
if (repoInfo) {
shell.echo(['Deployed to https://', repoInfo[1], '.github.io/', repoInfo[2] ,'/'].join(''));
var user = repoInfo[1];
var project = repoInfo[2];
shell.echo(['Deployed to https://', user, '.github.io/', project, '/'].join(''));
} else {
shell.echo('Unable to figure out repo name');
console.warn('Unable to figure out repo name: ');
}

10

package.json
{
"name": "deploy-gh",
"version": "0.1.2",
"version": "0.1.3",
"description": "A simple script to deploy master branch to github pages",

@@ -11,5 +11,5 @@ "main": "index.js",

"test": "echo \"Error: no test specified\" && exit 1",
"release:major": "release major",
"release:minor": "release minor",
"release:patch": "release patch",
"release:major": "shelljs-release major",
"release:minor": "shelljs-release minor",
"release:patch": "shelljs-release patch",
"deploy": "node index.js"

@@ -31,4 +31,4 @@ },

"devDependencies": {
"shelljs-release": "github:shelljs/release"
"shelljs-release": "^0.3.0"
}
}
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