makit 0.0.6 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25ea2184f779faed979afe31bd6494caca9f7ba01b77db6b4a70ed2f512c3f87
4
- data.tar.gz: f724c4e67f813a6677d73a62a79606938d0770ec92537ff9eb6dff3595e9021a
3
+ metadata.gz: a317e3a0c42657e54442ee7196cfa45f6564c3f8dc9f8f19bd724ec9323cca99
4
+ data.tar.gz: 7b4012ebcfc6cf8782eefa9f714998cde61cbd376133ae36d1c5a22dc660124d
5
5
  SHA512:
6
- metadata.gz: 63eb2e57ae7eefdd32a7f6a6ff65847e2c00fbcc1e5d5b194b2d464a3bb04b4e52c18b8700c2bbfc423afce5a9a868f5f7f0e4f6c35673d3ee803f0b43b3d176
7
- data.tar.gz: 28022382f1a8da338d32b1e550da2a68220636aa40948962d00cc6e0da907109d44d03558ae6bc94b6896052cb07cd007f0d5b7f8cb3b54a7e2ddd88cc057d96
6
+ metadata.gz: 3221237262d348e2cdbde5f7f9c9d9120724984d1785d850b44692e4566ac59ed7f4059292413406c661bcdea6254de3a40c5faa2ba4bc4830018446504e7489
7
+ data.tar.gz: 4b894848a4a29c6f881c77025add60d46e5369c0f129dfa22fa947c6a088f47ce79e5dbd2baa465425bb3f8fa0475a33d5279ff17d60a7f0869ab2734ce43274
data/lib/makit/dotnet.rb CHANGED
@@ -46,18 +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}"
56
+ RUNNER.cache_run(command_request, newest_file_date)
57
+ end
58
+ end
59
+
60
+ def self.publish(project_path, configuration = "Release", output = "artifacts")
61
+ project_dir = File.dirname(project_path)
62
+ newest_file = Makit::Directory::get_newest_file(project_dir)
63
+ command_request = Makit::RUNNER::parse_command_request("dotnet publish #{project_path} --configuration #{configuration} --output #{output}")
64
+ if newest_file.nil?
65
+ newest_file_date = Time.now
66
+ RUNNER.cache_run(command_request, newest_file_date)
67
+ else
68
+ newest_file_date = File.mtime(newest_file)
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)
61
82
  RUNNER.cache_run(command_request, newest_file_date)
62
83
  end
63
84
  end
@@ -146,13 +146,25 @@ module Makit
146
146
  project_path = File.join(project.output, "#{project.name}.csproj")
147
147
  Makit::DotNet.build(project_path, build_arg.configuration, build_arg.output)
148
148
  end
149
+ project.publish_args.each do |publish_arg|
150
+ project_path = File.join(project.output, "#{project.name}.csproj")
151
+ Makit::DotNet.publish(project_path, publish_arg.configuration, publish_arg.output)
152
+ end
149
153
  end
150
154
  end
151
155
  end
152
156
 
153
157
  def test_dotnet_projects
154
158
  self.dotnet_projects.each do |project|
155
- "dotnet test #{project.output} --configuration Release".run
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
156
168
  end
157
169
  end
158
170
  end # class Project
@@ -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\"\x8c\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\"8\n\x0f\x44otNetBuildArgs\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)
@@ -17,6 +17,8 @@ module Makit
17
17
  module V1
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
+ DotNetPublishArgs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetPublishArgs").msgclass
21
+ DotNetTestArgs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetTestArgs").msgclass
20
22
  Project = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.Project").msgclass
21
23
  CommandRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.CommandRequest").msgclass
22
24
  Command = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.Command").msgclass
data/lib/makit/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Makit
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.8"
5
5
 
6
6
  class Version
7
7
  # given an array of version strings, return the highest version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow