Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix ghdeploy to work again and to cleanup after itself

  • Loading branch information...
commit b9b14b4e5db840e8941395a483f3f7ee04a58c19 1 parent 91e071e
@dmose dmose authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 volofile
View
11 volofile
@@ -319,6 +319,10 @@
},
authInfo, repoName, hasGhPages;
+ var q = v.require('q'),
+ github = v.require('volo/lib/github')
+ githubAuth = v.require('volo/lib/github/auth');
+
q.call(function () {
//First check if there is already a repo
if (!v.exists(buildDir)) {
@@ -354,7 +358,7 @@
.then(function (data) {
var sshUrl = data.ssh_url;
- //Repo exists, see if there is a gh-pages repo
+ //Repo exists, see if there is a gh-pages branch
//already
github('repos/' + authInfo.user + '/' + repoName + '/branches')
.then(function (data) {
@@ -453,11 +457,14 @@
//Remove any files from git that are not on on disk
['git', 'add', '-u'],
['git', 'commit', '-m', message],
- ['git', 'push', 'origin', 'gh-pages']
+ ['git', 'push', 'origin', 'gh-pages'],
], spawnOptions);
});
})
.then(function () {
+ // return the main repo in the state it started in
+ v.sequence([['git', 'reset', 'HEAD']]);
+
if (repoName) {
return 'GitHub Pages is set up. Check http://' +
authInfo.user + '.github.com/' + repoName +
Please sign in to comment.
Something went wrong with that request. Please try again.