oxen_deployer_git 1.0.4 → 1.0.7
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/lib/oxen_deployer/git.rb +52 -42
- metadata +2 -2
data/lib/oxen_deployer/git.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
class OxenDeployer::Git
|
2
2
|
|
3
3
|
# Duh.
|
4
|
-
VERSION = "1.0.
|
4
|
+
VERSION = "1.0.7"
|
5
5
|
|
6
6
|
set :source, OxenDeployer::Git.new
|
7
7
|
set :git_cmd, "git"
|
@@ -14,47 +14,57 @@ class OxenDeployer::Git
|
|
14
14
|
destination = File.join(destination, 'repo')
|
15
15
|
revision = 'HEAD' if revision =~ /head/i
|
16
16
|
new_revision = ('HEAD' == revision) ? "origin" : revision
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
17
|
+
|
18
|
+
[ "cd #{destination}",
|
19
|
+
"#{git_cmd} checkout #{revision}",
|
20
|
+
"#{git_cmd} branch -D deployed-#{revision}",
|
21
|
+
"#{git_cmd} pull",
|
22
|
+
"#{git_cmd} branch deployed-#{revision} #{revision}",
|
23
|
+
"#{git_cmd} checkout deployed-#{revision}",
|
24
|
+
"cd -"
|
25
|
+
].join( " && ")
|
26
|
+
# if fast_checkout_applicable?(revision, destination)
|
27
|
+
# [ "cd #{destination}",
|
28
|
+
# "#{git_cmd} checkout #{revision}",
|
29
|
+
# "#{git_cmd} fetch",
|
30
|
+
# "#{git_cmd} reset --hard #{new_revision}",
|
31
|
+
# submodule_cmd,
|
32
|
+
# "#{git_cmd} branch -D deployed-#{revision}",
|
33
|
+
# "#{git_cmd} branch deployed-#{revision} #{revision}",
|
34
|
+
# "#{git_cmd} checkout deployed-#{revision}",
|
35
|
+
# "cd -"
|
36
|
+
# ].join(" && ")
|
37
|
+
# # [ "cd #{destination}",
|
38
|
+
# # "#{git_cmd} checkout -q origin",
|
39
|
+
# # "#{git_cmd} fetch",
|
40
|
+
# # "#{git_cmd} reset --hard #{new_revision}",
|
41
|
+
# # submodule_cmd,
|
42
|
+
# # "#{git_cmd} branch -f deployed-#{revision} #{revision}",
|
43
|
+
# # "#{git_cmd} checkout deployed-#{revision}",
|
44
|
+
# # "cd -"
|
45
|
+
# # ].join(" && ")
|
46
|
+
# else
|
47
|
+
# [ "rm -rf #{destination}",
|
48
|
+
# "mkdir -p #{destination}",
|
49
|
+
# "cd #{destination}",
|
50
|
+
# "#{git_cmd} init",
|
51
|
+
# "#{git_cmd} remote add -t #{revision} -f origin #{repository}",
|
52
|
+
# "#{git_cmd} checkout #{revision}",
|
53
|
+
# "#{git_cmd} branch -D deployed-#{revision}",
|
54
|
+
# "#{git_cmd} checkout -b deployed-#{revision}",
|
55
|
+
# submodule_cmd,
|
56
|
+
# "cd -"
|
57
|
+
# ].join(" && ")
|
58
|
+
# #
|
59
|
+
# #
|
60
|
+
# # [ "rm -rf #{destination}",
|
61
|
+
# # "#{git_cmd} clone #{repository} #{destination}",
|
62
|
+
# # "cd #{destination}",
|
63
|
+
# # "#{git_cmd} checkout -f -b deployed-#{revision} #{revision}",
|
64
|
+
# # submodule_cmd,
|
65
|
+
# # "cd -"
|
66
|
+
# # ].join(" && ")
|
67
|
+
# end
|
58
68
|
end
|
59
69
|
|
60
70
|
# Returns the command that will export +revision+ from the current
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oxen_deployer_git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-12-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: oxen_deployer
|