autobuild 1.2.13 → 1.2.14
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/Changes.txt +5 -1
- data/Rakefile +1 -1
- data/lib/autobuild.rb +1 -1
- data/lib/autobuild/import/git.rb +28 -14
- metadata +26 -7
data/Changes.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
+
== Version 1.2.14
|
2
|
+
* fix git importer's handling of branch names: the importer now always works on
|
3
|
+
a local branch that has the same name than the remote branch.
|
4
|
+
|
1
5
|
== Version 1.2.12
|
2
|
-
* reconfigure orogen packages if orogen itself
|
6
|
+
* reconfigure orogen packages if orogen itself has been updated
|
3
7
|
|
4
8
|
== Version 1.2.11
|
5
9
|
* fix small issues with CMake
|
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ Hoe.new('autobuild', Autobuild::VERSION) do |p|
|
|
7
7
|
|
8
8
|
p.summary = 'Rake-based utility to build and install multiple packages with dependencies'
|
9
9
|
p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
|
10
|
-
p.url = p.paragraphs_of('README.txt', 1).first.split(/\n/)[1..-1]
|
10
|
+
p.url = p.paragraphs_of('README.txt', 1).first.split(/\n/)[1..-1].map { |s| s.gsub('* ', '') }
|
11
11
|
p.changes = p.paragraphs_of('Changes.txt', 0).join("\n\n")
|
12
12
|
|
13
13
|
p.extra_deps << ['rake', '>= 0.7.0']
|
data/lib/autobuild.rb
CHANGED
data/lib/autobuild/import/git.rb
CHANGED
@@ -34,25 +34,33 @@ module Autobuild
|
|
34
34
|
raise ConfigException, "#{package.srcdir} is not a git repository"
|
35
35
|
end
|
36
36
|
|
37
|
-
# Fetch
|
37
|
+
# Fetch the remote reference
|
38
38
|
Subprocess.run(package.name, :import, Autobuild.tool('git'), 'fetch', repository, branch)
|
39
39
|
if !File.readable?( File.join('.git', 'FETCH_HEAD') )
|
40
40
|
return
|
41
41
|
end
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
# Check that we are on the right branch, and if not simply
|
44
|
+
# create it from FETCH_HEAD
|
45
|
+
current_branch = `git symbolic-ref HEAD`.chomp
|
46
|
+
if current_branch != "refs/heads/#{branch}"
|
47
|
+
Subprocess.run(package.name, :import, Autobuild.tool('git'), 'checkout', '-b', branch, "FETCH_HEAD")
|
48
|
+
else
|
49
|
+
# Otherwise, check that the merge is a fast-forward
|
50
|
+
fetch_commit = File.readlines( File.join('.git', 'FETCH_HEAD') ).
|
51
|
+
delete_if { |l| l =~ /not-for-merge/ }
|
52
|
+
return if fetch_commit.empty?
|
53
|
+
fetch_commit = fetch_commit.first.split(/\s+/).first
|
47
54
|
|
48
|
-
|
49
|
-
|
55
|
+
common_commit = `git merge-base HEAD #{fetch_commit}`.chomp
|
56
|
+
head_commit = `git rev-parse #{current_branch}`.chomp
|
50
57
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
58
|
+
if common_commit != fetch_commit
|
59
|
+
if merge? || common_commit == head_commit
|
60
|
+
Subprocess.run(package.name, :import, Autobuild.tool('git'), 'merge', fetch_commit)
|
61
|
+
else
|
62
|
+
raise "importing the current version would lead to a non fast-forward"
|
63
|
+
end
|
56
64
|
end
|
57
65
|
end
|
58
66
|
end
|
@@ -69,8 +77,14 @@ module Autobuild
|
|
69
77
|
repository, package.srcdir)
|
70
78
|
|
71
79
|
Dir.chdir(package.srcdir) do
|
72
|
-
|
73
|
-
|
80
|
+
current_branch = `git symbolic-ref HEAD`.chomp
|
81
|
+
if current_branch == "refs/heads/#{branch}"
|
82
|
+
Subprocess.run(package.name, :import, Autobuild.tool('git'),
|
83
|
+
'reset', '--hard', "autobuild/#{branch}")
|
84
|
+
else
|
85
|
+
Subprocess.run(package.name, :import, Autobuild.tool('git'),
|
86
|
+
'checkout', '-b', branch, "autobuild/#{branch}")
|
87
|
+
end
|
74
88
|
end
|
75
89
|
end
|
76
90
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autobuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-08 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -50,9 +50,26 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.12.
|
53
|
+
version: 1.12.2
|
54
54
|
version:
|
55
|
-
description:
|
55
|
+
description: |-
|
56
|
+
This work is licensed under the GPLv2 license. See License.txt for details
|
57
|
+
|
58
|
+
== What's autobuild ?
|
59
|
+
Autobuild imports, configures, builds and installs various kinds of software packages.
|
60
|
+
It can be used in software development to make sure that nothing is broken in the
|
61
|
+
build process of a set of packages, or can be used as an automated installation tool.
|
62
|
+
|
63
|
+
Autobuild config files are Ruby scripts which configure rake to
|
64
|
+
* imports the package from a SCM or (optionnaly) updates it
|
65
|
+
* configures it. This phase can handle code generation, configuration (for
|
66
|
+
instance for autotools-based packages), ...
|
67
|
+
* build
|
68
|
+
* install
|
69
|
+
|
70
|
+
It takes the dependencies between packages into account in its build process,
|
71
|
+
updates the needed environment variables (+PKG_CONFIG_PATH+, +PATH+,
|
72
|
+
+LD_LIBRARY_PATH+, ...)
|
56
73
|
email: sylvain.joyeux@m4x.org
|
57
74
|
executables:
|
58
75
|
- autobuild
|
@@ -101,7 +118,9 @@ files:
|
|
101
118
|
- test/test_subcommand.rb
|
102
119
|
- test/tools.rb
|
103
120
|
has_rdoc: true
|
104
|
-
homepage:
|
121
|
+
homepage: http://autobuild.rubyforge.org/autobuild
|
122
|
+
licenses: []
|
123
|
+
|
105
124
|
post_install_message:
|
106
125
|
rdoc_options:
|
107
126
|
- --main
|
@@ -123,9 +142,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
142
|
requirements: []
|
124
143
|
|
125
144
|
rubyforge_project: autobuild
|
126
|
-
rubygems_version: 1.
|
145
|
+
rubygems_version: 1.3.3
|
127
146
|
signing_key:
|
128
|
-
specification_version:
|
147
|
+
specification_version: 3
|
129
148
|
summary: Rake-based utility to build and install multiple packages with dependencies
|
130
149
|
test_files:
|
131
150
|
- test/test_import_tar.rb
|