mtbuild 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/CHANGES.md +9 -0
- data/README.md +4 -0
- data/lib/mtbuild.rb +1 -1
- data/lib/mtbuild/application_configuration.rb +4 -2
- data/lib/mtbuild/configuration.rb +5 -0
- data/lib/mtbuild/staticlibrary_configuration.rb +3 -1
- data/lib/mtbuild/test_application_configuration.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f3e4d1cccbe7c5456ef353cb5fd432eeccf0d06b
|
|
4
|
+
data.tar.gz: c0c996673e3682024d8514d67d51f93e204fdca7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c38f7fc92990df74599b2e7fbd4ab3a91a11e97582246afc2d891383ebeb1c713799a16ca363968021f6bf257857903577eb1d56ba72440ae4256ed5fa82c9f3
|
|
7
|
+
data.tar.gz: 34bea4ad42b155151ffb6324c6f2cf17a1308b9721c78b7fcf4d659f392faf594efc2857ea4871081843b6a11c931a664f69f1d948f8c6168aeeda3d58deff2a
|
data/CHANGES.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Release Notes #
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## MTBuild 0.1.2 ##
|
|
5
|
+
|
|
6
|
+
### Changes ###
|
|
7
|
+
|
|
8
|
+
* Fixed issue where executables and libraries are generated with colons in
|
|
9
|
+
their names due to workspace prefix.
|
|
10
|
+
* Added pre-build and post-build project tasks.
|
|
11
|
+
|
|
12
|
+
|
|
4
13
|
## MTBuild 0.1.1 ##
|
|
5
14
|
|
|
6
15
|
### Changes ###
|
data/README.md
CHANGED
|
@@ -467,6 +467,10 @@ Application Project configurations offer the following optional settings:
|
|
|
467
467
|
|
|
468
468
|
* ```:versioner``` - A versioner hash constructed with the ```versioner``` DSL method (detailed in a later section).
|
|
469
469
|
|
|
470
|
+
* ```:pre_build``` - A callable object (typically a ```lambda```) that will be invoked before the build of this configuration begins.
|
|
471
|
+
|
|
472
|
+
* ```:post_build``` - A callable object (typically a ```lambda```) that will be invoked after the build of this configuration completes.
|
|
473
|
+
|
|
470
474
|
### MTBuild::TestApplicationProject ###
|
|
471
475
|
|
|
472
476
|
Define a Test Application Project with the following DSL method:
|
data/lib/mtbuild.rb
CHANGED
|
@@ -18,11 +18,13 @@ module MTBuild
|
|
|
18
18
|
all_object_folders |= object_folders
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
project_filename = @parent_project.project_name.to_s.gsub(':','-')
|
|
22
|
+
application_binaries, application_files, application_folders = @default_toolchain.create_application_tasks(all_object_files, project_filename)
|
|
22
23
|
dependencies = @dependencies+all_object_folders+application_folders+application_files+application_binaries
|
|
23
24
|
|
|
24
25
|
desc "Build application '#{@parent_project.project_name}' with configuration '#{@configuration_name}'"
|
|
25
26
|
new_task = application_task @configuration_name => dependencies do |t|
|
|
27
|
+
@post_build.call if @post_build.respond_to? :call
|
|
26
28
|
puts "built application #{t.name}."
|
|
27
29
|
@tests.each do |test|
|
|
28
30
|
if Rake::Task.task_defined? test
|
|
@@ -34,7 +36,7 @@ module MTBuild
|
|
|
34
36
|
end
|
|
35
37
|
|
|
36
38
|
namespace @configuration_name do
|
|
37
|
-
OrganizedPackageTask.new("#{
|
|
39
|
+
OrganizedPackageTask.new("#{project_filename}-#{@configuration_name}", :noversion) do |t|
|
|
38
40
|
t.need_tar_gz = true
|
|
39
41
|
t.add_files_to_folder("", application_binaries+application_files)
|
|
40
42
|
end
|
|
@@ -25,6 +25,11 @@ module MTBuild
|
|
|
25
25
|
@output_folder = File.expand_path(File.join(output_folder, @configuration_name.to_s))
|
|
26
26
|
check_configuration(configuration)
|
|
27
27
|
|
|
28
|
+
@pre_build = configuration.fetch(:pre_build, nil)
|
|
29
|
+
@post_build = configuration.fetch(:post_build, nil)
|
|
30
|
+
|
|
31
|
+
@pre_build.call if @pre_build.respond_to? :call
|
|
32
|
+
|
|
28
33
|
@versioner = nil
|
|
29
34
|
@versioner_config = configuration.fetch(:versioner, nil)
|
|
30
35
|
@versioner = Versioner.create_versioner(@parent_project.project_name, @project_folder, @output_folder, @configuration_name, @versioner_config) unless @versioner_config.nil?
|
|
@@ -24,11 +24,13 @@ module MTBuild
|
|
|
24
24
|
all_object_folders |= object_folders
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
project_filename = @parent_project.project_name.to_s.gsub(':','-')
|
|
28
|
+
library_files, library_folders = @default_toolchain.create_static_library_tasks(all_object_files, project_filename)
|
|
28
29
|
dependencies = @dependencies+all_object_folders+library_folders+library_files
|
|
29
30
|
|
|
30
31
|
desc "Build library '#{@parent_project.project_name}' with configuration '#{@configuration_name}'"
|
|
31
32
|
new_task = static_library_task @configuration_name => dependencies do |t|
|
|
33
|
+
@post_build.call if @post_build.respond_to? :call
|
|
32
34
|
puts "built library #{t.name}."
|
|
33
35
|
@tests.each do |test|
|
|
34
36
|
if Rake::Task.task_defined? test
|
|
@@ -17,11 +17,13 @@ module MTBuild
|
|
|
17
17
|
all_object_folders |= object_folders
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
project_filename = @parent_project.project_name.to_s.gsub(':','-')
|
|
21
|
+
application_binaries, application_files, application_folders = @default_toolchain.create_application_tasks(all_object_files, project_filename)
|
|
21
22
|
dependencies = @dependencies+all_object_folders+application_folders+application_files+application_binaries
|
|
22
23
|
|
|
23
24
|
desc "Build and run test application '#{@parent_project.project_name}' with configuration '#{@configuration_name}'"
|
|
24
25
|
new_task = test_application_task @configuration_name => dependencies do |t|
|
|
26
|
+
@post_build.call if @post_build.respond_to? :call
|
|
25
27
|
puts "built test application #{t.name}."
|
|
26
28
|
sh "\"#{application_binaries.first}\""
|
|
27
29
|
puts "ran test application #{t.name}."
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mtbuild
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jerry Ryle
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-08-
|
|
11
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|