makit 0.0.170 → 0.0.171

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: 4ca893d50f58b61946c9d5990fd3ecfce41d16268c43f475181652ea7b5d3104
4
- data.tar.gz: 7f94c3dff71442437093145d8270780d3b18313b9b991a26f4cba5829c014ba1
3
+ metadata.gz: 59b32862b9a15f7bc6b3f93680fc73f36d57ecdc8cec339249558126bd5261a2
4
+ data.tar.gz: dffc4f234ba2b273a24ab48318a1b2b4a18909d6c62cb2f3a1c27e6938cfda0c
5
5
  SHA512:
6
- metadata.gz: a22daf468412bde6d78ae770ec1a55317d775a600699786c0373b8e280ded8bd841b45462f10f85bd7f7089d38188952de20539989d22fa7aa2c6e2c097e5d22
7
- data.tar.gz: 695c6dfeafa745c8836f8287e058e363db3be921a799459fff232dfd7d2dc88d47aef88d4a59d8031733083b281bd75a89ecf3a2aafc9365fb2011848e4478bf
6
+ metadata.gz: 4a222b4dd07bdfd09a32e30653302c66b66641b79673e74ce895de34220f7e6dc8282808f108682016b9547538ca93c7c11b03e4e848b62864f565678cc0a13f
7
+ data.tar.gz: 99304381dd2c55a429638280e3c219020d756065ee435eeed96e9fe8327040587c2701bd43dde6ac675bfe81c95d6a0737b797c1da384e45d7538fa5a24e2c0b
data/lib/makit/nuget.rb CHANGED
@@ -65,11 +65,87 @@ module Makit
65
65
  end
66
66
 
67
67
  def self.publish(package, api_key, source)
68
- # we do not want the api_key echoed to the console, substitute *****
69
- puts "dotnet nuget push #{package} --skip-duplicate --api-key ***** --source #{source}"
70
- puts `dotnet nuget push #{package} --skip-duplicate --api-key #{api_key} --source #{source}`
68
+ if api_key.nil? || api_key.to_s.strip.empty?
69
+ # No API key provided, skip --api-key flag
70
+ puts "dotnet nuget push #{package} --skip-duplicate --source #{source}"
71
+ puts `dotnet nuget push #{package} --skip-duplicate --source #{source}`
72
+ else
73
+ # we do not want the api_key echoed to the console, substitute *****
74
+ puts "dotnet nuget push #{package} --skip-duplicate --api-key ***** --source #{source}"
75
+ puts `dotnet nuget push #{package} --skip-duplicate --api-key #{api_key} --source #{source}`
76
+ end
71
77
  end
72
78
 
79
+ # Publishes a NuGet package to a local directory feed
80
+ #
81
+ # This method pushes a .nupkg file to a local directory-based NuGet feed.
82
+ # If the package already exists at the target location, it skips the push
83
+ # and displays a message indicating the package is already present.
84
+ #
85
+ # The target path follows the standard NuGet directory feed structure:
86
+ # {directory}/{package_name}/{version}/{package_name}.{version}.nupkg
87
+ #
88
+ # @param nuget_package_path [String] Full path to the .nupkg file to publish
89
+ # @param directory [String] Path to the local NuGet feed directory
90
+ # @param package_name [String] Name of the NuGet package (e.g., "MyCompany.MyPackage")
91
+ # @param version [String] Version of the package (e.g., "1.2.3")
92
+ # @return [void]
93
+ #
94
+ # @example Publish a package to a local feed directory
95
+ # # First, configure a local NuGet source named "local"
96
+ # Makit::NuGet.configure_source("local", "/Users/louie/code/nuget")
97
+ #
98
+ # # Publish a package to the local feed
99
+ # Makit::NuGet.publish_to_directory(
100
+ # "/path/to/MyPackage.1.0.0.nupkg",
101
+ # "/Users/louie/code/nuget",
102
+ # "MyPackage",
103
+ # "1.0.0"
104
+ # )
105
+ # # Creates: /Users/louie/code/nuget/mypackage/1.0.0/mypackage.1.0.0.nupkg
106
+ #
107
+ # @example Publish multiple versions of a package
108
+ # local_feed = "/Users/louie/code/nuget"
109
+ #
110
+ # # Publish version 1.0.0
111
+ # Makit::NuGet.publish_to_directory(
112
+ # "artifacts/MyCompany.Utils.1.0.0.nupkg",
113
+ # local_feed,
114
+ # "MyCompany.Utils",
115
+ # "1.0.0"
116
+ # )
117
+ #
118
+ # # Publish version 1.0.1
119
+ # Makit::NuGet.publish_to_directory(
120
+ # "artifacts/MyCompany.Utils.1.0.1.nupkg",
121
+ # local_feed,
122
+ # "MyCompany.Utils",
123
+ # "1.0.1"
124
+ # )
125
+ #
126
+ # @example Use with a configured "local" source
127
+ # # Configure the "local" source if not already configured
128
+ # Makit::NuGet.configure_source("local", "/Users/louie/code/nuget")
129
+ #
130
+ # # Get the source directory from the configured sources
131
+ # sources = Makit::NuGet.list_sources
132
+ # local_source = sources.find { |s| s[:name] == "local" }
133
+ # local_dir = local_source[:url] if local_source
134
+ #
135
+ # # Publish to the local source
136
+ # if local_dir
137
+ # Makit::NuGet.publish_to_directory(
138
+ # "bin/Release/MyApp.1.2.3.nupkg",
139
+ # local_dir,
140
+ # "MyApp",
141
+ # "1.2.3"
142
+ # )
143
+ # end
144
+ #
145
+ # @see configure_source For setting up the local NuGet source
146
+ # @see list_sources For retrieving configured NuGet sources
147
+ # @see migrate_packages For migrating packages between feeds
148
+ #
73
149
  def self.publish_to_directory(nuget_package_path, directory, package_name, version)
74
150
  target_package_path = "#{directory}/#{package_name}/#{version}/#{package_name}.#{version}.nupkg".downcase
75
151
  if File.exist?(target_package_path)
@@ -43,13 +43,13 @@ module Makit
43
43
  project.save
44
44
 
45
45
  # Setup the sln, then slnx
46
- if (!File.exist?("#{project.name}.slnx"))
47
- Makit::DotNet.new_solution(project.name)
48
- Makit::DotNet.sln_add_projects(project.name)
49
- # migrate the sln to slnx
50
- "dotnet sln migrate #{project.name}.sln".run
51
- FileUtils.rm_f("#{project.name}.sln") if File.exist?("#{project.name}.slnx")
52
- end
46
+ #if (!File.exist?("#{project.name}.slnx"))
47
+ # Makit::DotNet.new_solution(project.name)
48
+ # Makit::DotNet.sln_add_projects(project.name)
49
+ # # migrate the sln to slnx
50
+ # "dotnet sln migrate #{project.name}.sln".run
51
+ # FileUtils.rm_f("#{project.name}.sln") if File.exist?("#{project.name}.slnx")
52
+ #end
53
53
  Makit::Logging.default_logger.debug("Project setup completed")
54
54
  end
55
55
 
@@ -5,7 +5,7 @@ task :update do
5
5
  "bundle update".run if File.exist?("Gemfile")
6
6
  # are there any *.sln files?
7
7
  Dir.glob("**/*.sln").each do |sln_file|
8
- "dotnet sln migrate #{sln_file}".run
8
+ #"dotnet sln migrate #{sln_file}".run
9
9
  #FileUtils.rm_f(sln_file) if File.exist?(sln_file.gsub(".sln", ".slnx"))
10
10
  end
11
11
  "dotnet tool update --global dotnet-outdated-tool".run
data/lib/makit/version.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Makit
4
4
  # Static version for now to avoid circular dependency issues
5
- #VERSION = "0.0.170"
5
+ #VERSION = "0.0.171"
6
6
 
7
7
  # Version management utilities for various file formats
8
8
  #
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.170
4
+ version: 0.0.171
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow