mcrt 1.0.0 → 1.1.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mcrt.rb +7 -2
  3. data/mcrt.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a5f4893274cfe6b924abd9340bf1fb2ad211adc
4
- data.tar.gz: 0763e8c98a9e698b4b09c5d54f1cc9f6bf22795e
3
+ metadata.gz: 809e48a2389022ffc931ccc46f5eff34911529fa
4
+ data.tar.gz: 0a29fe25a73e1fc30ae2cd21d6af54a79a2ab694
5
5
  SHA512:
6
- metadata.gz: aa8f8be4b8251e6c862b957076bb423358812cc1ddec2bd5d4c82a748e8a2f7ca9cb4dcdc68e180b8479e50e7cb0c9ca523ce099edf39d1515a614fb9213ec34
7
- data.tar.gz: 934f665741976e6b8561667f228cfadb270af36369f53c8cbc768446aa788d3f0dd647ffaab88dd5b49971be6adbc362b61ea22dcc1c71384292bc6dbb6fb490
6
+ metadata.gz: 1c1ed51bf81bcdfbd4a7fd54a9e707c0fe55243f661af42a6576f46a59229257f9a254d3fb27ece7046aa592ebe2799fba2ee44afda3d8a7c8d0c1fe369a0823
7
+ data.tar.gz: ad11f4700aaa566cdceb4fa111bd8a96cf07c004f2853c42f50b34e5b9b1d293dc18abcc8c73129b5ae98bf2db61d0c8993c681b2af775a820c36128a9391009
data/lib/mcrt.rb CHANGED
@@ -62,6 +62,13 @@ class MavenCentralPublishTool
62
62
  JSON.pretty_generate('data' => { 'description' => description, 'stagedRepositoryIds' => [repository_id] }))
63
63
  end
64
64
 
65
+ def promote_repository(repository_id, description)
66
+ post_request('https://oss.sonatype.org/service/local/staging/bulk/promote',
67
+ JSON.pretty_generate('data' => { 'autoDropAfterRelease' => true,
68
+ 'description' => description,
69
+ 'stagedRepositoryIds' => [repository_id] }))
70
+ end
71
+
65
72
  def drop_repository(repository_id, description)
66
73
  post_request('https://oss.sonatype.org/service/local/staging/bulk/drop',
67
74
  JSON.pretty_generate('data' => { 'description' => description, 'stagedRepositoryIds' => [repository_id] }))
@@ -81,9 +88,7 @@ class MavenCentralPublishTool
81
88
  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.'
82
89
  end
83
90
  begin
84
- #TODO: Implement the next method
85
91
  promote_repository(candidate['repositoryId'], "Promoting repository for #{project.name}")
86
- drop_repository(candidate['repositoryId'], "Dropping repository for #{project.name}")
87
92
  rescue
88
93
  raise 'Failed to promote repository. Please visit the website https://oss.sonatype.org/index.html#stagingRepositories and manually complete the release.'
89
94
  end
data/mcrt.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{mcrt}
5
- s.version = '1.0.0'
5
+ s.version = '1.1.0'
6
6
  s.platform = Gem::Platform::RUBY
7
7
 
8
8
  s.authors = ['Peter Donald']
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.0.0
4
+ version: 1.1.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 00:00:00.000000000 Z
11
+ date: 2017-10-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Maven Central Release Tool.
14
14
  email: peter@realityforge.org