mcrt 1.2.0 → 1.3.0
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/lib/mcrt.rb +19 -4
- data/mcrt.gemspec +1 -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: b03889b8ee7f6c36ecb9e0d6546a10205c2f4f3b
|
4
|
+
data.tar.gz: 42b3d925c3ee60b21741374bcf16c8d10ed4ecac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 601c1aaf905bebd60cc8178435d1deb7f5ca80196253975d548aa47733f16e4aa57d96dae546ab5c600d27ed47e6c33dcf1aa5d62144edfdb0205b5e89f321df
|
7
|
+
data.tar.gz: 18530c1e355c6893bc68c68386923c1b39af8bef0740595e9d20a02e2a395d981c0bf3f5817c319d4b8f84d1db49deadb3eb37214cc790e3462feb6d4cfa9d49
|
data/lib/mcrt.rb
CHANGED
@@ -46,14 +46,14 @@ class MavenCentralPublishTool
|
|
46
46
|
@user_agent || "Ruby-#{RUBY_VERSION}"
|
47
47
|
end
|
48
48
|
|
49
|
-
def get_staging_repositories(profile_name)
|
49
|
+
def get_staging_repositories(profile_name, ignore_transitioning_repositories = true)
|
50
50
|
result = get_request('https://oss.sonatype.org/service/local/staging/profile_repositories')
|
51
51
|
result = JSON.parse(result)
|
52
52
|
result['data'].select do |repo|
|
53
53
|
repo['profileName'] == profile_name &&
|
54
54
|
repo['userId'] == self.username &&
|
55
55
|
repo['userAgent'] == self.user_agent &&
|
56
|
-
repo['
|
56
|
+
(!ignore_transitioning_repositories || !repo['transitioning'])
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
@@ -82,20 +82,35 @@ class MavenCentralPublishTool
|
|
82
82
|
raise 'Release process found multiple staging repositories that could be the release just uploaded. Please visit the website https://oss.sonatype.org/index.html#stagingRepositories and manually complete the release.'
|
83
83
|
else
|
84
84
|
candidate = candidates[0]
|
85
|
+
puts "Requesting close of staging repository #{profile_name}:#{candidate['repositoryId']}"
|
85
86
|
begin
|
86
|
-
close_repository(candidate['repositoryId'], "Closing repository for #{
|
87
|
+
close_repository(candidate['repositoryId'], "Closing repository for #{profile_name}")
|
87
88
|
rescue Exception => e
|
88
89
|
puts "#{e.class.name}: #{e.message}"
|
89
90
|
puts e.backtrace.join("\n")
|
90
91
|
raise 'Failed to close repository. It is likely that the release does not conform to Maven Central release requirements. Please visit the website https://oss.sonatype.org/index.html#stagingRepositories and manually complete the release.'
|
91
92
|
end
|
93
|
+
while get_staging_repositories(profile_name).size == 0
|
94
|
+
puts 'Waiting for repository to close...'
|
95
|
+
sleep 1
|
96
|
+
end
|
97
|
+
puts "Requesting promotion of staging repository #{profile_name}:#{candidate['repositoryId']}"
|
92
98
|
begin
|
93
|
-
promote_repository(candidate['repositoryId'], "Promoting repository for #{
|
99
|
+
promote_repository(candidate['repositoryId'], "Promoting repository for #{profile_name}")
|
94
100
|
rescue Exception => e
|
95
101
|
puts "#{e.class.name}: #{e.message}"
|
96
102
|
puts e.backtrace.join("\n")
|
97
103
|
raise 'Failed to promote repository. Please visit the website https://oss.sonatype.org/index.html#stagingRepositories and manually complete the release.'
|
98
104
|
end
|
105
|
+
repositories = get_staging_repositories(profile_name, false)
|
106
|
+
while repositories.size == 1
|
107
|
+
puts "Waiting for repository to be promoted..."
|
108
|
+
sleep 1
|
109
|
+
if repositories[0][:notifications] != 0
|
110
|
+
raise 'Failed to promote repository. Please visit the website https://oss.sonatype.org/index.html#stagingRepositories and manually complete the release.'
|
111
|
+
end
|
112
|
+
repositories = get_staging_repositories(profile_name, false)
|
113
|
+
end
|
99
114
|
end
|
100
115
|
end
|
101
116
|
|
data/mcrt.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mcrt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Donald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Maven Central Release Tool.
|
14
14
|
email: peter@realityforge.org
|