gitploy 0.2.0 → 0.2.1
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.
- data/README.markdown +2 -1
- data/VERSION +1 -1
- data/gitploy.gemspec +2 -2
- data/lib/gitploy.rb +16 -3
- metadata +4 -4
data/README.markdown
CHANGED
@@ -19,7 +19,6 @@ strategy. No hooks, very little behind-the-scenes magic - it just does what you
|
|
19
19
|
require 'gitploy/script'
|
20
20
|
|
21
21
|
configure do |c|
|
22
|
-
c.repo = 'git@github.com:myuser/fooapp.git'
|
23
22
|
c.path = '/var/www/fooapp'
|
24
23
|
|
25
24
|
stage :staging do
|
@@ -37,6 +36,8 @@ strategy. No hooks, very little behind-the-scenes magic - it just does what you
|
|
37
36
|
remote do
|
38
37
|
run "mkdir -p #{config.path}"
|
39
38
|
run "cd #{config.path} && git init"
|
39
|
+
run "git config --bool receive.denyNonFastForwards false"
|
40
|
+
run "git config receive.denyCurrentBranch ignore"
|
40
41
|
end
|
41
42
|
end
|
42
43
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/gitploy.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{gitploy}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brent Dillingham"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-29}
|
13
13
|
s.default_executable = %q{gitploy}
|
14
14
|
s.description = %q{Dead-simple deployments. No, for real this time.}
|
15
15
|
s.email = %q{brentdillingham@gmail.com}
|
data/lib/gitploy.rb
CHANGED
@@ -3,8 +3,9 @@ module Gitploy
|
|
3
3
|
attr_accessor :config
|
4
4
|
|
5
5
|
class Config
|
6
|
-
REQUIRED_OPTIONS = [:
|
6
|
+
REQUIRED_OPTIONS = [:path, :user, :host]
|
7
7
|
attr_accessor *REQUIRED_OPTIONS
|
8
|
+
attr_accessor :local_branch, :remote_branch
|
8
9
|
|
9
10
|
def check!
|
10
11
|
unless missing_options.empty?
|
@@ -20,6 +21,10 @@ module Gitploy
|
|
20
21
|
def configure
|
21
22
|
config = Config.new
|
22
23
|
yield config; config.check!
|
24
|
+
|
25
|
+
config.local_branch ||= current_branch
|
26
|
+
config.remote_branch ||= 'master'
|
27
|
+
|
23
28
|
self.config = config
|
24
29
|
end
|
25
30
|
|
@@ -66,7 +71,7 @@ module Gitploy
|
|
66
71
|
end
|
67
72
|
|
68
73
|
def push!
|
69
|
-
local { run "git push #{config.user}@#{config.host}:#{config.path}/.git
|
74
|
+
local { run "git push #{config.user}@#{config.host}:#{config.path}/.git #{config.local_branch}:#{config.remote_branch}" }
|
70
75
|
end
|
71
76
|
|
72
77
|
private
|
@@ -100,4 +105,12 @@ module Gitploy
|
|
100
105
|
@run_queue = []
|
101
106
|
cmd
|
102
107
|
end
|
103
|
-
|
108
|
+
|
109
|
+
def current_branch
|
110
|
+
if branch = `git symbolic-ref HEAD`
|
111
|
+
branch.chomp.gsub('refs/heads/', '')
|
112
|
+
else
|
113
|
+
'master'
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brent Dillingham
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-29 00:00:00 -04:00
|
19
19
|
default_executable: gitploy
|
20
20
|
dependencies: []
|
21
21
|
|