tetra 0.53.0 → 0.54.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/template/package.spec +3 -3
- data/lib/tetra/packages/package.rb +4 -1
- data/lib/tetra/pom.rb +4 -0
- data/lib/tetra/project.rb +7 -7
- data/lib/tetra/ui/dry_run_subcommand.rb +2 -2
- data/lib/tetra/version.rb +1 -1
- metadata +2 -2
data/lib/template/package.spec
CHANGED
@@ -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
|
-
|
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
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
|
-
|
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
|
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,
|
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
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.
|
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-
|
12
|
+
date: 2015-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|