makit 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/makit/dotnet.rb +13 -10
- data/lib/makit/mp/project_mp.rb +9 -1
- data/lib/makit/v1/makit.v1_pb.rb +2 -1
- data/lib/makit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a317e3a0c42657e54442ee7196cfa45f6564c3f8dc9f8f19bd724ec9323cca99
|
4
|
+
data.tar.gz: 7b4012ebcfc6cf8782eefa9f714998cde61cbd376133ae36d1c5a22dc660124d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3221237262d348e2cdbde5f7f9c9d9120724984d1785d850b44692e4566ac59ed7f4059292413406c661bcdea6254de3a40c5faa2ba4bc4830018446504e7489
|
7
|
+
data.tar.gz: 4b894848a4a29c6f881c77025add60d46e5369c0f129dfa22fa947c6a088f47ce79e5dbd2baa465425bb3f8fa0475a33d5279ff17d60a7f0869ab2734ce43274
|
data/lib/makit/dotnet.rb
CHANGED
@@ -46,36 +46,39 @@ module Makit
|
|
46
46
|
|
47
47
|
def self.build(project_path, configuration = "Release", output = "artifacts")
|
48
48
|
project_dir = File.dirname(project_path)
|
49
|
-
#puts "project_dir: #{project_dir}"
|
50
49
|
newest_file = Makit::Directory::get_newest_file(project_dir)
|
51
50
|
command_request = Makit::RUNNER::parse_command_request("dotnet build #{project_path} --configuration #{configuration} --output #{output}")
|
52
51
|
if newest_file.nil?
|
53
|
-
#puts "newest_git_file is nil, assigning a default"
|
54
|
-
# assign a timestamp of now
|
55
52
|
newest_file_date = Time.now
|
56
53
|
RUNNER.cache_run(command_request, newest_file_date)
|
57
54
|
else
|
58
55
|
newest_file_date = File.mtime(newest_file)
|
59
|
-
#puts "newest file: #{newest_file}"
|
60
|
-
#puts "newest file date: #{newest_file_date}"
|
61
56
|
RUNNER.cache_run(command_request, newest_file_date)
|
62
57
|
end
|
63
58
|
end
|
64
59
|
|
65
60
|
def self.publish(project_path, configuration = "Release", output = "artifacts")
|
66
61
|
project_dir = File.dirname(project_path)
|
67
|
-
#puts "project_dir: #{project_dir}"
|
68
62
|
newest_file = Makit::Directory::get_newest_file(project_dir)
|
69
63
|
command_request = Makit::RUNNER::parse_command_request("dotnet publish #{project_path} --configuration #{configuration} --output #{output}")
|
70
64
|
if newest_file.nil?
|
71
|
-
#puts "newest_git_file is nil, assigning a default"
|
72
|
-
# assign a timestamp of now
|
73
65
|
newest_file_date = Time.now
|
74
66
|
RUNNER.cache_run(command_request, newest_file_date)
|
75
67
|
else
|
76
68
|
newest_file_date = File.mtime(newest_file)
|
77
|
-
|
78
|
-
|
69
|
+
RUNNER.cache_run(command_request, newest_file_date)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.test(project_path, configuration = "Release", output = "artifacts")
|
74
|
+
project_dir = File.dirname(project_path)
|
75
|
+
newest_file = Makit::Directory::get_newest_file(project_dir)
|
76
|
+
command_request = Makit::RUNNER::parse_command_request("dotnet test #{project_path} --configuration #{configuration} --output #{output}")
|
77
|
+
if newest_file.nil?
|
78
|
+
newest_file_date = Time.now
|
79
|
+
RUNNER.cache_run(command_request, newest_file_date)
|
80
|
+
else
|
81
|
+
newest_file_date = File.mtime(newest_file)
|
79
82
|
RUNNER.cache_run(command_request, newest_file_date)
|
80
83
|
end
|
81
84
|
end
|
data/lib/makit/mp/project_mp.rb
CHANGED
@@ -156,7 +156,15 @@ module Makit
|
|
156
156
|
|
157
157
|
def test_dotnet_projects
|
158
158
|
self.dotnet_projects.each do |project|
|
159
|
-
|
159
|
+
if (project.os == "windows" && !Makit::Environment.is_windows?)
|
160
|
+
next
|
161
|
+
else
|
162
|
+
project.test.each do |test_args|
|
163
|
+
project_path = File.join(project.output, "#{project.name}.csproj")
|
164
|
+
Makit::DotNet.test(project_path, test_args.configuration, test_args.output)
|
165
|
+
end
|
166
|
+
#"dotnet test #{project.output} --configuration Release".run
|
167
|
+
end
|
160
168
|
end
|
161
169
|
end
|
162
170
|
end # class Project
|
data/lib/makit/v1/makit.v1_pb.rb
CHANGED
@@ -8,7 +8,7 @@ require 'google/protobuf/timestamp_pb'
|
|
8
8
|
require 'google/protobuf/duration_pb'
|
9
9
|
|
10
10
|
|
11
|
-
descriptor_data = "\n\x1blib/makit/v1/makit.v1.proto\x12\x08makit.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\"\xbf\x01\n\rDotNetProject\x12\x10\n\x08template\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06output\x18\x03 \x01(\t\x12\x10\n\x08packages\x18\x04 \x03(\t\x12\n\n\x02os\x18\x05 \x01(\t\x12-\n\nbuild_args\x18\x06 \x03(\x0b\x32\x19.makit.v1.DotNetBuildArgs\x12\x31\n\x0cpublish_args\x18\x07 \x03(\x0b\x32\x1b.makit.v1.DotNetPublishArgs\"8\n\x0f\x44otNetBuildArgs\x12\x15\n\rconfiguration\x18\x01 \x01(\t\x12\x0e\n\x06output\x18\x02 \x01(\t\":\n\x11\x44otNetPublishArgs\x12\x15\n\rconfiguration\x18\x01 \x01(\t\x12\x0e\n\x06output\x18\x02 \x01(\t\"a\n\x07Project\x12\x16\n\x0egit_remote_url\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x30\n\x0f\x64otnet_projects\x18\x05 \x03(\x0b\x32\x17.makit.v1.DotNetProject\"\xa5\x01\n\x0e\x43ommandRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x03(\t\x12+\n\x07timeout\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\tdirectory\x18\x04 \x01(\t\x12\x0c\n\x04task\x18\x05 \x01(\t\x12\r\n\x05input\x18\x06 \x01(\x0c\x12\x15\n\rexit_on_error\x18\x07 \x01(\x08\"\x91\x02\n\x07\x43ommand\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\targuments\x18\x03 \x03(\t\x12\x11\n\texit_code\x18\x04 \x01(\x05\x12\r\n\x05input\x18\x05 \x01(\x0c\x12\x0e\n\x06output\x18\x06 \x01(\x0c\x12\r\n\x05\x65rror\x18\x07 \x01(\x0c\x12.\n\nstarted_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08\x64uration\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04user\x18\n \x01(\t\x12\x0e\n\x06\x64\x65vice\x18\x0b \x01(\t\x12\n\n\x02os\x18\x0c \x01(\t\x12\x11\n\tdirectory\x18\r \x01(\t\"I\n\rConfiguration\x12\x0c\n\x04name\x18\x01 \x01(\t\x12*\n\x08\x63ommands\x18\x02 \x03(\x0b\x32\x18.makit.v1.CommandRequest\"3\n\rGitRepository\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\t\"h\n\x0bGitLogEntry\x12\x0e\n\x06\x63ommit\x18\x01 \x01(\t\x12\x0e\n\x06\x61uthor\x18\x02 \x01(\t\x12(\n\x04\x64\x61te\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07message\x18\x04 \x01(\t\"\xc8\x01\n\nMakeResult\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x0e\n\x06\x63ommit\x18\x02 \x01(\t\x12\x0e\n\x06\x62ranch\x18\x03 \x01(\t\x12\x0b\n\x03tag\x18\x04 \x01(\t\x12\x0e\n\x06\x64\x65vice\x18\x05 \x01(\t\x12\x1a\n\x12runtime_identifier\x18\x06 \x01(\t\x12#\n\x08\x63ommands\x18\x07 \x03(\x0b\x32\x11.makit.v1.Command\x12\x14\n\x0cinitial_size\x18\x08 \x01(\x05\x12\x12\n\nfinal_size\x18\t \x01(\x05\"?\n\rDotNetNewArgs\x12\x10\n\x08template\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06output\x18\x03 \x01(\t**\n\x08Language\x12\x08\n\x04RUBY\x10\x00\x12\n\n\x06\x43SHARP\x10\x01\x12\x08\n\x04RUST\x10\x02*,\n\x0bPackageType\x12\x07\n\x03GEM\x10\x00\x12\t\n\x05NUGET\x10\x01\x12\t\n\x05\x43RATE\x10\x03\x32H\n\x0e\x43ommandService\x12\x36\n\x07\x45xecute\x12\x18.makit.v1.CommandRequest\x1a\x11.makit.v1.Commandb\x06proto3"
|
11
|
+
descriptor_data = "\n\x1blib/makit/v1/makit.v1.proto\x12\x08makit.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\"\xbf\x01\n\rDotNetProject\x12\x10\n\x08template\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06output\x18\x03 \x01(\t\x12\x10\n\x08packages\x18\x04 \x03(\t\x12\n\n\x02os\x18\x05 \x01(\t\x12-\n\nbuild_args\x18\x06 \x03(\x0b\x32\x19.makit.v1.DotNetBuildArgs\x12\x31\n\x0cpublish_args\x18\x07 \x03(\x0b\x32\x1b.makit.v1.DotNetPublishArgs\"8\n\x0f\x44otNetBuildArgs\x12\x15\n\rconfiguration\x18\x01 \x01(\t\x12\x0e\n\x06output\x18\x02 \x01(\t\":\n\x11\x44otNetPublishArgs\x12\x15\n\rconfiguration\x18\x01 \x01(\t\x12\x0e\n\x06output\x18\x02 \x01(\t\"7\n\x0e\x44otNetTestArgs\x12\x15\n\rconfiguration\x18\x01 \x01(\t\x12\x0e\n\x06output\x18\x02 \x01(\t\"a\n\x07Project\x12\x16\n\x0egit_remote_url\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x30\n\x0f\x64otnet_projects\x18\x05 \x03(\x0b\x32\x17.makit.v1.DotNetProject\"\xa5\x01\n\x0e\x43ommandRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x03(\t\x12+\n\x07timeout\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\tdirectory\x18\x04 \x01(\t\x12\x0c\n\x04task\x18\x05 \x01(\t\x12\r\n\x05input\x18\x06 \x01(\x0c\x12\x15\n\rexit_on_error\x18\x07 \x01(\x08\"\x91\x02\n\x07\x43ommand\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\targuments\x18\x03 \x03(\t\x12\x11\n\texit_code\x18\x04 \x01(\x05\x12\r\n\x05input\x18\x05 \x01(\x0c\x12\x0e\n\x06output\x18\x06 \x01(\x0c\x12\r\n\x05\x65rror\x18\x07 \x01(\x0c\x12.\n\nstarted_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08\x64uration\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04user\x18\n \x01(\t\x12\x0e\n\x06\x64\x65vice\x18\x0b \x01(\t\x12\n\n\x02os\x18\x0c \x01(\t\x12\x11\n\tdirectory\x18\r \x01(\t\"I\n\rConfiguration\x12\x0c\n\x04name\x18\x01 \x01(\t\x12*\n\x08\x63ommands\x18\x02 \x03(\x0b\x32\x18.makit.v1.CommandRequest\"3\n\rGitRepository\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\t\"h\n\x0bGitLogEntry\x12\x0e\n\x06\x63ommit\x18\x01 \x01(\t\x12\x0e\n\x06\x61uthor\x18\x02 \x01(\t\x12(\n\x04\x64\x61te\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07message\x18\x04 \x01(\t\"\xc8\x01\n\nMakeResult\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x0e\n\x06\x63ommit\x18\x02 \x01(\t\x12\x0e\n\x06\x62ranch\x18\x03 \x01(\t\x12\x0b\n\x03tag\x18\x04 \x01(\t\x12\x0e\n\x06\x64\x65vice\x18\x05 \x01(\t\x12\x1a\n\x12runtime_identifier\x18\x06 \x01(\t\x12#\n\x08\x63ommands\x18\x07 \x03(\x0b\x32\x11.makit.v1.Command\x12\x14\n\x0cinitial_size\x18\x08 \x01(\x05\x12\x12\n\nfinal_size\x18\t \x01(\x05\"?\n\rDotNetNewArgs\x12\x10\n\x08template\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06output\x18\x03 \x01(\t**\n\x08Language\x12\x08\n\x04RUBY\x10\x00\x12\n\n\x06\x43SHARP\x10\x01\x12\x08\n\x04RUST\x10\x02*,\n\x0bPackageType\x12\x07\n\x03GEM\x10\x00\x12\t\n\x05NUGET\x10\x01\x12\t\n\x05\x43RATE\x10\x03\x32H\n\x0e\x43ommandService\x12\x36\n\x07\x45xecute\x12\x18.makit.v1.CommandRequest\x1a\x11.makit.v1.Commandb\x06proto3"
|
12
12
|
|
13
13
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
14
|
pool.add_serialized_file(descriptor_data)
|
@@ -18,6 +18,7 @@ module Makit
|
|
18
18
|
DotNetProject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetProject").msgclass
|
19
19
|
DotNetBuildArgs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetBuildArgs").msgclass
|
20
20
|
DotNetPublishArgs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetPublishArgs").msgclass
|
21
|
+
DotNetTestArgs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetTestArgs").msgclass
|
21
22
|
Project = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.Project").msgclass
|
22
23
|
CommandRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.CommandRequest").msgclass
|
23
24
|
Command = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.Command").msgclass
|
data/lib/makit/version.rb
CHANGED