ghpages_deploy 2.0.8 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ghpages_deploy/git_manager.rb +10 -7
- data/lib/ghpages_deploy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e914f1c2435ac68771161842c26c9c49ec140d8
|
4
|
+
data.tar.gz: 9f965f6258b34a645a9647588c6803c6f42f9d04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c52e079c6adbace9f68d05657f900c99208fb5925c9dc1e7d367be9d4b83607cda8247d2d5fc02804a6d1b0ba9626702005e9af793252d629cf05d11d97b2bf4
|
7
|
+
data.tar.gz: 4e78feb6b57a0a45c28c7194cb0aeffab56ec1c454bbef1d6c96cbd45d7d9330759b9154bed0638b974e2dc8ed0bb8f343cab8ca1225828d4a85594c3b6bf91e
|
@@ -49,7 +49,7 @@ module GithubPages
|
|
49
49
|
|
50
50
|
def commit_and_push(msg)
|
51
51
|
@git.commit(msg)
|
52
|
-
@git.push(remote, "
|
52
|
+
@git.push(remote, "ghpages_deployment:#{branch}")
|
53
53
|
end
|
54
54
|
|
55
55
|
def remove(*files)
|
@@ -78,7 +78,8 @@ module GithubPages
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def setup_repo
|
81
|
-
@git.
|
81
|
+
@git.remove_remote(remote) if @git.remotes.map(&:name).include?(remote)
|
82
|
+
@git.add_remote(remote, repo)
|
82
83
|
@git.remote(remote).fetch
|
83
84
|
end
|
84
85
|
|
@@ -93,19 +94,21 @@ module GithubPages
|
|
93
94
|
git "clean -d -x -f -e #{@preserved}"
|
94
95
|
end
|
95
96
|
|
96
|
-
def remote_branch
|
97
|
-
@git.branches.remote.
|
97
|
+
def remote_branch?
|
98
|
+
@git.branches.remote.any? do |br|
|
98
99
|
br.name == branch && br.remote == remote
|
99
100
|
end
|
100
101
|
end
|
101
102
|
|
102
103
|
def setup_branch
|
103
|
-
if
|
104
|
-
|
104
|
+
if remote_branch?
|
105
|
+
puts 'checking out remote branch'
|
106
|
+
git "checkout -b ghpages_deployment #{remote}/#{branch}"
|
105
107
|
remove_staged
|
106
108
|
@git.pull(remote, branch)
|
107
109
|
else
|
108
|
-
|
110
|
+
puts 'checking out orphan branch'
|
111
|
+
git "checkout --orphan ghpages_deployment"
|
109
112
|
remove_staged
|
110
113
|
end
|
111
114
|
end
|