sunraise 0.1.2 → 0.1.3
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/deployer.rb +12 -4
- data/sunraise.example +1 -1
- data/sunraise.gemspec +1 -1
- metadata +2 -2
data/lib/deployer.rb
CHANGED
@@ -56,16 +56,23 @@ module SunRaise
|
|
56
56
|
|
57
57
|
log_ok "New commits: \n #{new_commits.join "\n "}"
|
58
58
|
@new_dir = "pre_release"
|
59
|
-
|
59
|
+
|
60
60
|
ssh_exec [
|
61
61
|
"cd #{deploy_path}",
|
62
62
|
"rm #{@new_dir} .git_temp previous2 current2 -rf", # if previous deploy was crashed
|
63
63
|
"mv current/.git .git_temp", # moving repo dir
|
64
|
-
"cp current #{@new_dir}", # clone sitedir without .git
|
64
|
+
"cp current #{@new_dir} -r", # clone sitedir without .git
|
65
65
|
"mv .git_temp #{@new_dir}/.git", # move git in pre_release folder
|
66
|
+
]
|
67
|
+
|
68
|
+
ssh_exec (conf[:shared_dirs] + conf[:linked_dirs]).map {|dir| "rm #{deploy_path}/#{@new_dir}/#{dir}" }
|
69
|
+
|
70
|
+
ssh_exec [
|
66
71
|
"cd #{@new_dir}",
|
72
|
+
"git reset HEAD --hard",
|
67
73
|
"git pull origin master"
|
68
74
|
]
|
75
|
+
|
69
76
|
log_ok "Forked, git updated"
|
70
77
|
|
71
78
|
make_links @new_dir
|
@@ -99,10 +106,10 @@ module SunRaise
|
|
99
106
|
|
100
107
|
def make_links dist_dir
|
101
108
|
links = []
|
102
|
-
conf[:shared_dirs].each do |dir|
|
109
|
+
conf[:shared_dirs].each do |link_to, dir|
|
103
110
|
links << "rm #{dir} -rf"
|
104
111
|
links << "mkdir #{deploy_path}/shared/#{dir} -p"
|
105
|
-
links << "ln -s #{deploy_path}/shared/#{
|
112
|
+
links << "ln -s #{deploy_path}/shared/#{link_to} #{dir}"
|
106
113
|
end
|
107
114
|
|
108
115
|
conf[:linked_dirs].each do |dir|
|
@@ -195,3 +202,4 @@ module SunRaise
|
|
195
202
|
|
196
203
|
end
|
197
204
|
end
|
205
|
+
|
data/sunraise.example
CHANGED
@@ -6,7 +6,7 @@ git_url 'git://github.com/Paxa/sunraise_test_app.git'
|
|
6
6
|
deploy_to '/tmp/deploy/suntest'
|
7
7
|
then_link_to '/tmp/www/suntest'
|
8
8
|
|
9
|
-
shared_dirs
|
9
|
+
shared_dirs 'public/stylesheets' => 'css', 'public/javascript' => 'js'
|
10
10
|
linked_dirs ['logs', 'tmp']
|
11
11
|
|
12
12
|
local_project_path "/home/paxa/Dropbox/sunraise/test/suntest"
|
data/sunraise.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunraise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Evstigneev
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-22 00:00:00 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|