Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mbushkov/robert
base: db64827c16
...
head fork: mbushkov/robert
compare: ff5d84b861
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
Commits on Aug 08, 2011
@mbushkov robert2 -> robert
Added "local" area definition
7825a7e
@mbushkov robert2 -> rober
area:localhost -> area:local
80af50c
@mbushkov Properly saving revisions into the database - properly converting
objects to strings and vice versa
e8ca70f
@mbushkov Fixed bugs in deployment logic ff5d84b
View
4 lib/robert/deployment/core/snapshot_transaction.rb
@@ -121,7 +121,7 @@ def deploy_single_deployment(arg, new_snapshot, prev_snapshot)
dep = new_conf = nil
if arg.respond_to?(:run)
new_conf = arg
- dep = OpenStruct.new(:name => new_conf.project_name, :revision => new_conf.revision)
+ dep = OpenStruct.new(:name => new_conf.project_name, :revision => new_conf.revision.to_s)
else
dep = arg
new_conf = configuration_getter.call(dep)
@@ -129,7 +129,7 @@ def deploy_single_deployment(arg, new_snapshot, prev_snapshot)
Deployment.transaction do
new_dep = new_snapshot.find_or_initialize_deployment_by_name(dep.name)
- new_dep.revision = new_conf.revision
+ new_dep.revision = new_conf.revision.to_s
new_dep.runtime_dependencies = new_conf.runtime_dependencies
new_dep.deployed_at = Time.now
new_dep.save!
View
8 lib/robert/deployment/ext/base.rb
@@ -5,7 +5,7 @@
conf :deployable do
tags << :deployable
- var[:local,:robert,:root] = var[:remote,:robert,:root] = "/usr/local/robert2"
+ var[:local,:robert,:root] = var[:remote,:robert,:root] = "/usr/local/robert"
var[:local,:build,:misc] = ->{ "#{var[:local,:robert,:root]}/misc" }
var[:local,:build,:repository] = -> { "#{var[:local,:robert,:root]}/build" }
var[:remote,:deployment,:repository] = ->{ "#{var[:remote,:robert,:root]}/dep" }
@@ -56,6 +56,12 @@ def revision_deployment
conf :area do
end
+conf "area:local" do
+ include :area
+ var[:role] = ["localhost"]
+ var[:role,:app] = ["localhost"]
+end
+
conf :base_after do
if tags.include?(:deployable)
act[:revision] = revision.session_one_time(revision.from_str(act[:revision]))
View
2  lib/robert/deployment/ext/build.rb
@@ -6,7 +6,7 @@
force_build = var?[:cmdline,:args,:force_build]
$top.adjust do
- var[:deployment,:area] = :localhost
+ var[:deployment,:area] = :local
$top.confs($top.confs_names, :with_tags => :deployable) do
if force_sources
View
16 lib/robert/deployment/ext/cli.rb
@@ -9,7 +9,7 @@
var(:deployment,:deployment,:force) { var?[:cmdline,:args,:force_deploy] }
defn cli.determine_area do
- body { |names|
+ body { |confs|
raise "not supported"
}
end
@@ -18,10 +18,10 @@
body { |confs|
dep_confs = confs
deps = dep_confs.map do |dc|
- Robert::Deployment::Deployment.new(:name => dc.conf_name, :revision => dc.revision)
+ Robert::Deployment::Deployment.new(:name => dc.conf_name, :revision => dc.revision.to_s)
end
- area_name = var?[:deployment,:area] || var?[:cmdline,:args,:area] || determine_area(names)
+ area_name = var?[:deployment,:area] || var?[:cmdline,:args,:area] || determine_area(dep_confs)
used_configurations = Hash.new do |h,dep|
$top.adjust do
@@ -55,11 +55,11 @@
act[:deploy] = deployment_db.with_connection(
deployment_db.migrate(
cli.prepare_deployment(
- names.from_cmdline(
- names.with_runtime_deps(
- names.remote_fresh_only(
- names.order_by_runtime_deps(
- cli.deploy)))))))
+ confs_to_deploy.from_cmdline(
+ confs_to_deploy.with_runtime_deps(
+# confs_to_deploy.remote_fresh_only(
+ confs_to_deploy.order_by_runtime_deps(
+ cli.deploy))))))#)
var[:prepare_build,:deployment,:area] = :local
act[:build] = deployment_db.with_connection(
View
2  lib/robert/deployment/ext/db.rb
@@ -1,4 +1,4 @@
-var[:robert,:deployment,:db,:path] = "/usr/local/robert2/db/robert.db"
+var[:robert,:deployment,:db,:path] = "/usr/local/robert/db/robert.db"
defn deployment_db.with_connection do
View
4 lib/robert/deployment/ext/deployment/copy.rb
@@ -12,7 +12,7 @@
defn deployment_copy.link_deployment do
body {
with_capistrano :roles => :app do |cap|
- cap.run "sh '#{File.join(revision_deployment.deployment_root, link_script_name)}' '#{revision_deployment.deployment_root}'"
+ cap.run "sh '#{File.join(revision_deployment.deployment_root, link_script,:name)}' '#{revision_deployment.deployment_root}'"
end
}
end
@@ -20,7 +20,7 @@
defn deployment_copy.unlink_deployment do
body {
with_capistrano :roles => :app do |cap|
- cap.run "sh '#{File.join(revision_deployment.deployment_root, unlink_script_name)}'"
+ cap.run "sh '#{File.join(revision_deployment.deployment_root, unlink_script,:name)}'"
end
}
end
View
7 lib/robert/deployment/ext/scm/git.rb
@@ -12,8 +12,8 @@ def <=>(other)
time <=> other.time
end
- def from_s(str)
- raise "invalid git revision string: #{str}" unless str =~ /^(.+)_(.+)$/
+ def self.from_s(str)
+ raise "invalid git revision string: '#{str}'" unless str =~ /^(.+)_(.+)$/
GitRevision.new(Time.at($1.to_i), $2)
end
@@ -65,8 +65,7 @@ def to_s
defn git.revision_from_str do
body { |revision_str|
- str_split = revision_str.split("_")
- GitRevision.new(str_split[0].to_i, str_split[1])
+ GitRevision.from_s(revision_str)
}
end

No commit comments for this range

Something went wrong with that request. Please try again.