tetra 0.53.0 → 0.54.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,7 +32,9 @@ BuildRequires: xz
32
32
  BuildRequires: java-devel
33
33
  BuildRequires: <%= kit_name %> == <%= kit_version %>
34
34
  BuildArch: noarch
35
+ <% artifact_ids.each do |artifact_id| %>
35
36
  Provides: mvn(<%= group_id %>:<%= artifact_id %>) == <%= version %>
37
+ <% end %>
36
38
  Requires: java
37
39
  <% runtime_dependency_ids.each do |dependency_id| %>
38
40
  Requires: mvn(<%= dependency_id[0] %>:<%= dependency_id[1] %>) <% if dependency_id[3] != nil %>==<%= dependency_id[3] %><% end %>
@@ -64,8 +66,6 @@ cp -a <%= output %> %{buildroot}%{_javadir}/<%= File.basename(output) %>
64
66
 
65
67
  %files
66
68
  %defattr(-,root,root)
67
- <% outputs.each do |output| %>
68
- %{_javadir}/<%= File.basename(output) %>
69
- <% end %>
69
+ %{_javadir}/*
70
70
 
71
71
  %changelog
@@ -15,7 +15,6 @@ module Tetra
15
15
  def_delegator :@pom, :license_name, :license
16
16
  def_delegator :@pom, :url
17
17
  def_delegator :@pom, :group_id
18
- def_delegator :@pom, :artifact_id
19
18
  def_delegator :@pom, :version
20
19
  def_delegator :@pom, :runtime_dependency_ids
21
20
 
@@ -27,6 +26,10 @@ module Tetra
27
26
  @patches = patches.map { |f| File.basename(f) }
28
27
  end
29
28
 
29
+ def artifact_ids
30
+ @pom.modules.any? ? @pom.modules : [@pom.artifact_id]
31
+ end
32
+
30
33
  # a short summary from the POM
31
34
  def summary
32
35
  cleanup_description(@pom.description, 60)
data/lib/tetra/pom.rb CHANGED
@@ -45,6 +45,10 @@ module Tetra
45
45
  end
46
46
  end
47
47
 
48
+ def modules
49
+ @doc.xpath("project/modules/module").map { |e| e.text }
50
+ end
51
+
48
52
  def scm_connection
49
53
  @doc.xpath("project/scm/connection").text || ""
50
54
  end
data/lib/tetra/project.rb CHANGED
@@ -90,12 +90,7 @@ module Tetra
90
90
  # since last mark
91
91
  def src_patched?
92
92
  from_directory do
93
- latest_id = @git.latest_id("tetra: sources-")
94
- if latest_id
95
- @git.changed_files("src", latest_id).any?
96
- else
97
- false
98
- end
93
+ @git.changed_files("src", "HEAD").any?
99
94
  end
100
95
  end
101
96
 
@@ -132,7 +127,7 @@ module Tetra
132
127
  comments += build_script_lines.map { |l| "tetra: build-script-line: #{l}" }
133
128
 
134
129
  # if this is the first dry-run, mark sources as tarball
135
- if @git.latest_id("tetra: dry-run-finished").nil?
130
+ if first_dry_run
136
131
  comments << "tetra: sources-tarball"
137
132
  end
138
133
 
@@ -140,6 +135,11 @@ module Tetra
140
135
  commit_whole_directory(".", *comments)
141
136
  end
142
137
 
138
+ # returns true if this is the first dry-run
139
+ def first_dry_run
140
+ @git.latest_id("tetra: dry-run-finished").nil?
141
+ end
142
+
143
143
  # ends a dry-run assuming the build went wrong
144
144
  # reverts the whole project directory
145
145
  def abort
@@ -7,14 +7,14 @@ module Tetra
7
7
  checking_exceptions do
8
8
  project = Tetra::Project.new(".")
9
9
 
10
- if project.src_patched?
10
+ if project.src_patched? && !project.first_dry_run
11
11
  puts "Some files in src/ were changed since last dry-run,"
12
12
  puts "use \"tetra patch message\" to include changes in a patch before dry-running."
13
13
  puts "Dry run not started"
14
14
  else
15
15
  project.dry_run
16
16
  puts "Dry-run started in a new bash shell."
17
- puts "Build your project now, you can use \"tetra mvn\" and \"tetra ant\"."
17
+ puts "Build your project now, \"mvn\" and \"ant\" are already bundled by tetra."
18
18
  puts "If the build succeedes end this dry run with ^D (Ctrl+D),"
19
19
  puts "if the build does not succeed use ^C^D to abort and undo any change"
20
20
 
data/lib/tetra/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  # base module for tetra
4
4
  module Tetra
5
- VERSION = "0.53.0"
5
+ VERSION = "0.54.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tetra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.53.0
4
+ version: 0.54.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-20 00:00:00.000000000 Z
12
+ date: 2015-04-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake