makit 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 254994adada857fd53b6fc18040b3741700d2569481db7797d24f70a5cf791df
4
- data.tar.gz: f86c6304e3ac3bed1d9080847f30142cdd21e89ea1c228f0a7369563322a1e49
3
+ metadata.gz: 4de025058b813e3c1699c3c61b88f41ee4b240e177601f44dc0f17ec5f0c67c5
4
+ data.tar.gz: 22bd0773d03bf5eff59687a02c885f95d1af6f42fc070f602709644db890a4d1
5
5
  SHA512:
6
- metadata.gz: 59f41b1d403be9db7cfddb78cd4dfef508ca8e3b415477b23a2dd49018abe88c3265f4b14df4261bea2f8c5f9e23ff79b9a544297a426e5092de8580d6a7f82e
7
- data.tar.gz: 8e8a11079149d5ffbf0a12f90cd729664b0ea276d50628f73ffd23a092712f9fc6d55a7c16abb60e34b8492e74e458a1aff16fc9e9eac194d27898334ab19aa6
6
+ metadata.gz: d46712e62096bbcd66a6a20c457dc3a3d87a158c88772e0ffafc95486ca8021438301b5aa1cfdfc1bfed98617cbc42784e52bdf5b210f4a2b52203afcac2eec4
7
+ data.tar.gz: ff31b4b541c6362419e4d6f23f830471ab3118ab0f8acee48d4a1cb1516e145a09871019cdefa84ac96f205f536b223031b7539677642047899c04206e4b6898
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
- #puts "newest file: #{newest_file}"
78
- #puts "newest file date: #{newest_file_date}"
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
@@ -108,6 +108,10 @@ module Makit
108
108
  build_dotnet_projects
109
109
  end
110
110
 
111
+ def test
112
+ test_dotnet_projects
113
+ end
114
+
111
115
  def setup_dotnet_projects
112
116
  if self.dotnet_projects.any?
113
117
  if (!File.exist?("#{self.name}.sln"))
@@ -156,7 +160,15 @@ module Makit
156
160
 
157
161
  def test_dotnet_projects
158
162
  self.dotnet_projects.each do |project|
159
- "dotnet test #{project.output} --configuration Release".run
163
+ if (project.os == "windows" && !Makit::Environment.is_windows?)
164
+ next
165
+ else
166
+ project.test.each do |test_args|
167
+ project_path = File.join(project.output, "#{project.name}.csproj")
168
+ Makit::DotNet.test(project_path, test_args.configuration, test_args.output)
169
+ end
170
+ #"dotnet test #{project.output} --configuration Release".run
171
+ end
160
172
  end
161
173
  end
162
174
  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\"\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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Makit
4
- VERSION = "0.0.7"
4
+ VERSION = "0.0.9"
5
5
 
6
6
  class Version
7
7
  # given an array of version strings, return the highest version
data/lib/makit.rb CHANGED
@@ -16,6 +16,14 @@ module Makit
16
16
 
17
17
  # Constants
18
18
  #PROJECT = Makit::V1::Project.create
19
+ PROJECT=Makit::V1::Project.new()
20
+ PROJECT.set_default_values
21
+ if File.exist? ".makit.project.json"
22
+ PROJECT.open ".makit.project.json"
23
+ else
24
+ PROJECT.open ".makit.project.yml" if File.exist? ".makit.project.yml"
25
+ end
26
+
19
27
 
20
28
  STARTTIME = Time.now
21
29
  IS_GIT_REPO = Dir.exist? ".git"
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.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow