dev 1.0.179 → 1.0.180

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,22 +14,26 @@ class BoostBuild
14
14
  end
15
15
 
16
16
  def self.getLibraryProperties(filename)
17
- words=filename.split('-')
18
- flags=words[2];
19
- flags = flags + "-" + words[3] if words.length == 5
20
- result="<toolset>" + getToolset(words[1])
17
+ #words=filename.split('-')
18
+ #flags=words[2] if words.length == 4
19
+ #flags = flags + "-" + words[3] if words.length == 5
20
+ #result="<toolset>" + getToolset(words[1]) if words.length==4
21
21
  link="static"
22
22
  link="shared" if filename.index("lib") != 0
23
23
  link="shared" if filename.include?(".so")
24
- result = result + " <link>" + link + " "
25
- result = result + " <variant>release " if !flags.include?("d")
26
- result = result + " <variant>debug " if flags.include?("d")
27
- result = result + " <threading>multi " if flags.include?("mt")
28
- result = result + " <threading>single " if !flags.include?("mt")
29
- #result = result + " <runtime-link>shared " if !flags.include?("s")
30
- result = result + " <runtime-link>static " if flags.include?("s")
31
- #result = result + " <runtime-debugging>off " if !flags.include?("g")
32
- result = result + " <runtime-debugging>on " if flags.include?("g")
24
+ result = " <link>" + link + " "
25
+ variant = "release"
26
+ variant = "debug" if filename.include?("d.")
27
+ #result = result + " <variant>release " if !flags.include?("d")
28
+ #result = result + " <variant>debug " if flags.include?("d")
29
+ result = result + " <variant>#{variant} "
30
+ threading="single"
31
+ threading="multi" if filename.include?("-mt")
32
+ #result = result + " <threading>multi " if flags.include?("mt")
33
+ #result = result + " <threading>single " if !flags.include?("mt")
34
+ result = result + " <threading>#{threading}"
35
+ #result = result + " <runtime-link>static " if flags.include?("s")
36
+ result = result + " <runtime-debugging>on " if filename.include?('-gd') #if flags.include?("g")
33
37
  result = result + ";"
34
38
  end
35
39
 
data/lib/dev/Database.rb CHANGED
@@ -36,10 +36,15 @@ class Database
36
36
  columns="#{columns}#{s.to_s} text"
37
37
  }
38
38
  @db.execute("create table Results(#{columns});") if ! table_names.include? "Results"
39
+ @db.close
40
+ @db=nil
39
41
  end
40
42
 
41
43
  def set_branch_uri(name,uri)
44
+ @db = SQLite3::Database.new Dev::Database.filename
42
45
  @db.execute("insert or replace into Branches (Name,Uri) VALUES ('#{name}','#{uri}');")
46
+ @db.close
47
+ @db=nil
43
48
  end
44
49
 
45
50
  def has_result(h)
@@ -61,7 +66,10 @@ class Database
61
66
  values="#{values}'#{sval}'"
62
67
  }
63
68
  #puts "insert or replace into Results (#{columns}) VALUES (#{values});"
69
+ @db = SQLite3::Database.new Dev::Database.filename
64
70
  @db.execute("insert or replace into Results (#{columns}) VALUES (#{values});")
71
+ @db.close
72
+ @db=nil
65
73
  end
66
74
 
67
75
  def get_results(where_hash)
@@ -80,7 +88,7 @@ class Database
80
88
  columns="#{columns}#{s.to_s}"
81
89
  }
82
90
 
83
-
91
+ @db = SQLite3::Database.new Dev::Database.filename
84
92
  @db.execute("select #{columns} from Results where #{where};") do |row|
85
93
  h=Hash.new
86
94
  index = 0
@@ -91,15 +99,20 @@ class Database
91
99
  }
92
100
  array << h if !h.empty?
93
101
  end
102
+ @db.close
103
+ @db=nil
94
104
 
95
105
  return array
96
106
  end
97
107
 
98
108
  def get_branch_uri(name)
99
109
  uri=""
110
+ @db = SQLite3::Database.new Dev::Database.filename
100
111
  @db.execute("select Uri from Branches where Name='#{name}';") do |row|
101
112
  uri=eval(row[0].to_s)[0]
102
113
  end
114
+ @db.close
115
+ @db=nil
103
116
  return uri
104
117
  end
105
118
 
@@ -107,9 +120,12 @@ class Database
107
120
  names=Array.new
108
121
  sql="select Name from Branches where Name LIKE '#{pattern}';"
109
122
  sql="select Name from Branches;" if pattern.nil? || pattern.length==0
123
+ @db = SQLite3::Database.new Dev::Database.filename
110
124
  @db.execute(sql) do |row|
111
125
  names << row[0] if(row[0].length > 0)
112
126
  end
127
+ @db.close
128
+ @db=nil
113
129
  return names
114
130
  end
115
131
  end # class Database
data/lib/dev/cmd/Build.rb CHANGED
@@ -35,6 +35,7 @@ class Build
35
35
  # store results to database
36
36
 
37
37
  db.add_result(result)
38
+ db=nil
38
39
  end
39
40
 
40
41
 
@@ -49,15 +50,14 @@ class Build
49
50
 
50
51
  def self.status(branch)
51
52
  db=Dev::Database.new
52
- #puts "status of branch " + branch.foreground(:green) + "@#{h[:revision]}"
53
53
  h=Dev::Cmd::Build.get_branch_hash(branch)
54
54
  puts "status of branch " + branch.foreground(:green) + "@#{h[:revision]}"
55
- #Hash.print_hash("",h)
56
55
 
57
56
  # do any results exist for latest revision?
58
57
  results=db.get_results({:uri=>"#{h[:uri]}", :revision=>"#{h[:revision]}"})
59
58
  #resultss=db.get_results({:branch=>h[:branch]})
60
59
  #results=db.get_results({:uri=>"#{h[:uri]}"})
60
+ db=nil
61
61
 
62
62
  puts " no results" if results.empty?
63
63
 
@@ -73,7 +73,7 @@ class Build
73
73
  end
74
74
 
75
75
  def self.work(branch)
76
- db=Dev::Database.new
76
+ #db=Dev::Database.new
77
77
 
78
78
  puts " "
79
79
  puts "working on branch " + branch.foreground(:green)
@@ -97,6 +97,7 @@ class Build
97
97
  db=Dev::Database.new
98
98
  h=Hash.new
99
99
  h[:uri]=db.get_branch_uri(branch)
100
+ db=nil
100
101
  h[:revision]=Dev::Svn.last_changed_revision(h[:uri])
101
102
  h[:dir]="#{Dev::Environment.dev_root}/exp/#{branch}@#{h[:revision]}"
102
103
  h[:user]="#{Dev::Environment.user}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.179
4
+ version: 1.0.180
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -243,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  version: '0'
244
244
  requirements: []
245
245
  rubyforge_project: dev
246
- rubygems_version: 1.8.23
246
+ rubygems_version: 1.8.24
247
247
  signing_key:
248
248
  specification_version: 3
249
249
  summary: dev