kpm 0.10.2 → 0.10.5
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/.gitignore +4 -2
- data/kpm.gemspec +1 -1
- data/lib/kpm/blob.rb +4 -0
- data/lib/kpm/inspector.rb +8 -1
- data/lib/kpm/nexus_helper/nexus_api_calls_v2.rb +1 -1
- data/lib/kpm/plugins_directory.yml +4 -4
- data/lib/kpm/version.rb +1 -1
- data/packaging/Gemfile +1 -4
- data/packaging/kpm.sh +1 -1
- data/pom.xml +11 -6
- data/tasks/package.rake +67 -28
- metadata +19 -6
- data/release.sh +0 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9494301ca44d5d736b5451e958d0e6f16abc4c5aa9c0965b82aa2827f869ce84
|
4
|
+
data.tar.gz: bd60d65f4870ef85cf896d532d0b81e97985f38611c2472a51dd509cf7eed49d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38bd4cc2f8f9b546b3fe733723cd54049b5c0c5547b2861247a8b8ee6e023753f1ef650bf4e7d8b80a36d2f7b387e0c337a25188978ca5b73714760ce5a3dddc
|
7
|
+
data.tar.gz: ca87e6f189fa9f7ea5a171fcd7ed75f0dc9ed6bbd52ab0c646bff97b65f2fd180f864561180129ab796922429aa94c5cdbccf7021a7ac14482b030ff4df44d26
|
data/.gitignore
CHANGED
@@ -2,10 +2,12 @@ Gemfile.lock
|
|
2
2
|
pkg
|
3
3
|
packaging/tmp
|
4
4
|
packaging/vendor
|
5
|
-
kpm-*-linux-x86.tar.gz
|
6
5
|
kpm-*-linux-x86_64.tar.gz
|
6
|
+
kpm-*-osx-arm64.tar.gz
|
7
7
|
kpm-*-osx.tar.gz
|
8
|
-
|
8
|
+
kpm-*-noarch.tar.gz
|
9
|
+
portable-ruby-*.tar.gz
|
10
|
+
jruby-dist-*-bin.tar.gz
|
9
11
|
*.asc
|
10
12
|
.rakeTasks
|
11
13
|
pom.xml.versionsBackup
|
data/kpm.gemspec
CHANGED
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
|
|
43
43
|
|
44
44
|
s.add_dependency 'highline', '~> 1.6.21'
|
45
45
|
s.add_dependency 'killbill-client', '~> 3.2'
|
46
|
-
s.add_dependency 'rubyzip', '~>1.
|
46
|
+
s.add_dependency 'rubyzip', '~> 1.3.0'
|
47
47
|
s.add_dependency 'thor', '~> 0.19.1'
|
48
48
|
|
49
49
|
s.add_development_dependency 'gem-release', '~> 2.2'
|
data/lib/kpm/blob.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'fileutils'
|
4
|
+
|
3
5
|
module KPM
|
4
6
|
class Blob
|
5
7
|
def initialize(value, tmp_dir)
|
6
8
|
@tmp_dir = tmp_dir
|
7
9
|
@blob_file = @tmp_dir + File::SEPARATOR + rand.to_s
|
10
|
+
# Make sure directory is 'rx' for others to allow LOAD_FILE to work
|
11
|
+
FileUtils.chmod('a+rx', @tmp_dir)
|
8
12
|
store_value(value)
|
9
13
|
end
|
10
14
|
|
data/lib/kpm/inspector.rb
CHANGED
@@ -75,7 +75,14 @@ module KPM
|
|
75
75
|
plugin_map = { plugin_name: plugin_name, plugin_path: plugin_path.to_s, type: type }
|
76
76
|
entries = get_entries(plugin_path)
|
77
77
|
set_default = entries.select { |e| e == 'SET_DEFAULT' }[0]
|
78
|
-
default_version =
|
78
|
+
default_version = nil
|
79
|
+
if set_default
|
80
|
+
begin
|
81
|
+
default_version = File.basename(File.readlink(plugin_path.join(set_default)))
|
82
|
+
rescue StandardError
|
83
|
+
# On Windows, SET_DEFAULT is a directory, not a symbolic link
|
84
|
+
end
|
85
|
+
end
|
79
86
|
|
80
87
|
non_default = entries.reject do |e|
|
81
88
|
e == 'SET_DEFAULT'
|
@@ -92,7 +92,7 @@ module KPM
|
|
92
92
|
|
93
93
|
def build_query_params(coordinates, what_parameters = nil)
|
94
94
|
artifact = parse_coordinates(coordinates)
|
95
|
-
@version = artifact[:version].to_s
|
95
|
+
@version = artifact[:version].to_s
|
96
96
|
|
97
97
|
query = { g: artifact[:group_id], a: artifact[:artifact_id], e: artifact[:extension], v: version, r: configuration[:repository] }
|
98
98
|
query.merge!(c: artifact[:classifier]) unless artifact[:classifier].nil?
|
@@ -13,13 +13,13 @@
|
|
13
13
|
:versions:
|
14
14
|
:0.18: 4.2.5
|
15
15
|
:0.20: 6.0.1
|
16
|
-
:0.22: 7.2.
|
16
|
+
:0.22: 7.2.7
|
17
17
|
:avatax:
|
18
18
|
:type: :java
|
19
19
|
:versions:
|
20
20
|
:0.18: 0.4.1
|
21
21
|
:0.20: 0.6.1
|
22
|
-
:0.22: 0.8.
|
22
|
+
:0.22: 0.8.4
|
23
23
|
:cybersource:
|
24
24
|
:type: :ruby
|
25
25
|
:versions:
|
@@ -38,7 +38,7 @@
|
|
38
38
|
:versions:
|
39
39
|
:0.18: 0.3.1
|
40
40
|
:0.20: 0.5.1
|
41
|
-
:0.22: 0.7.
|
41
|
+
:0.22: 0.7.2
|
42
42
|
:forte:
|
43
43
|
:type: :java
|
44
44
|
:versions:
|
@@ -80,4 +80,4 @@
|
|
80
80
|
:stripe:
|
81
81
|
:type: :java
|
82
82
|
:versions:
|
83
|
-
:0.22: 7.3.
|
83
|
+
:0.22: 7.3.1
|
data/lib/kpm/version.rb
CHANGED
data/packaging/Gemfile
CHANGED
data/packaging/kpm.sh
CHANGED
@@ -11,4 +11,4 @@ unset BUNDLE_IGNORE_CONFIG
|
|
11
11
|
|
12
12
|
# Run the actual app using the bundled Ruby interpreter, with Bundler activated.
|
13
13
|
# See https://github.com/phusion/traveling-ruby/issues/58
|
14
|
-
exec "$SELFDIR/lib/ruby/bin/ruby" -rbundler/setup -rreadline $SELFDIR/lib/vendor
|
14
|
+
exec "$SELFDIR/lib/ruby/bin/ruby" -rbundler/setup -rreadline $SELFDIR/lib/vendor/*ruby/2.*/bin/kpm $@
|
data/pom.xml
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
<modelVersion>4.0.0</modelVersion>
|
23
23
|
<groupId>org.kill-bill.billing.installer</groupId>
|
24
24
|
<artifactId>kpm</artifactId>
|
25
|
-
<version>0.10.
|
25
|
+
<version>0.10.5</version>
|
26
26
|
<packaging>pom</packaging>
|
27
27
|
<name>KPM</name>
|
28
28
|
<description>KPM: the Kill Bill Package Manager</description>
|
@@ -147,11 +147,6 @@
|
|
147
147
|
</goals>
|
148
148
|
<configuration>
|
149
149
|
<artifacts>
|
150
|
-
<artifact>
|
151
|
-
<file>kpm-${project.version}-linux-x86.tar.gz</file>
|
152
|
-
<type>tar.gz</type>
|
153
|
-
<classifier>linux-x86</classifier>
|
154
|
-
</artifact>
|
155
150
|
<artifact>
|
156
151
|
<file>kpm-${project.version}-linux-x86_64.tar.gz</file>
|
157
152
|
<type>tar.gz</type>
|
@@ -162,6 +157,16 @@
|
|
162
157
|
<type>tar.gz</type>
|
163
158
|
<classifier>osx</classifier>
|
164
159
|
</artifact>
|
160
|
+
<artifact>
|
161
|
+
<file>kpm-${project.version}-osx-arm64.tar.gz</file>
|
162
|
+
<type>tar.gz</type>
|
163
|
+
<classifier>osx-arm64</classifier>
|
164
|
+
</artifact>
|
165
|
+
<artifact>
|
166
|
+
<file>kpm-${project.version}-noarch.tar.gz</file>
|
167
|
+
<type>tar.gz</type>
|
168
|
+
<classifier>noarch</classifier>
|
169
|
+
</artifact>
|
165
170
|
</artifacts>
|
166
171
|
</configuration>
|
167
172
|
</execution>
|
data/tasks/package.rake
CHANGED
@@ -9,33 +9,50 @@ PACKAGE_NAME = 'kpm'
|
|
9
9
|
require './lib/kpm/version'
|
10
10
|
VERSION = KPM::VERSION
|
11
11
|
|
12
|
-
# See https://
|
13
|
-
|
12
|
+
# See https://www.jruby.org/download
|
13
|
+
JRUBY_VERSION = '9.3.4.0'
|
14
|
+
# See https://github.com/Homebrew/homebrew-portable-ruby/releases
|
15
|
+
HOMEBREW_PORTABLE_RUBY_VERSION = '2.6.8_1'
|
14
16
|
|
15
17
|
# Remove unused files to reduce package size
|
16
18
|
GEMS_PATH = 'packaging/vendor/ruby/*/gems/*/'
|
17
19
|
REMOVE_FILES = %w[test tests spec README* CHANGE* Change* COPYING* LICENSE* MIT-LICENSE* doc docs examples ext/*/Makefile .gitignore .travis.yml].freeze
|
18
20
|
REMOVE_EXTENSIONS = %w[*.md *.c *.h *.rl extconf.rb *.java *.class *.so *.o].freeze
|
19
21
|
|
22
|
+
NOARCH_TARGET = 'noarch'
|
23
|
+
LINUX_X86_TARGET = 'x86_64_linux'
|
24
|
+
OSX_X86_TARGET = 'el_capitan'
|
25
|
+
OSX_ARM_TARGET = 'arm64_big_sur'
|
26
|
+
|
20
27
|
desc 'Package your app'
|
21
|
-
task package: %w[package:linux:
|
28
|
+
task package: %w[package:noarch package:linux:x86_64 package:osx:x86_64 package:osx:arm64]
|
22
29
|
|
23
30
|
namespace :package do
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
31
|
+
desc 'Package KPM (noarch)'
|
32
|
+
task noarch: [:bundle_install, "packaging/jruby-dist-#{JRUBY_VERSION}-bin.tar.gz"] do
|
33
|
+
create_package(NOARCH_TARGET, 'noarch')
|
34
|
+
end
|
29
35
|
|
36
|
+
namespace :linux do
|
30
37
|
desc 'Package KPM for Linux x86_64'
|
31
|
-
task x86_64: [:bundle_install, "packaging/
|
32
|
-
|
38
|
+
task x86_64: [:bundle_install, "packaging/portable-ruby-#{HOMEBREW_PORTABLE_RUBY_VERSION}.#{LINUX_X86_TARGET}.bottle.tar.gz"] do
|
39
|
+
ensure_ruby_version
|
40
|
+
create_package(LINUX_X86_TARGET, 'linux-x86_64')
|
33
41
|
end
|
34
42
|
end
|
35
43
|
|
36
|
-
|
37
|
-
|
38
|
-
|
44
|
+
namespace :osx do
|
45
|
+
desc 'Package KPM for OSX x86_64'
|
46
|
+
task x86_64: [:bundle_install, "packaging/portable-ruby-#{HOMEBREW_PORTABLE_RUBY_VERSION}.#{OSX_X86_TARGET}.bottle.tar.gz"] do
|
47
|
+
ensure_ruby_version
|
48
|
+
create_package(OSX_X86_TARGET, 'osx')
|
49
|
+
end
|
50
|
+
|
51
|
+
desc 'Package KPM for OSX arm64'
|
52
|
+
task arm64: [:bundle_install, "packaging/portable-ruby-#{HOMEBREW_PORTABLE_RUBY_VERSION}.#{OSX_ARM_TARGET}.bottle.tar.gz"] do
|
53
|
+
ensure_ruby_version
|
54
|
+
create_package(OSX_ARM_TARGET, 'osx-arm64')
|
55
|
+
end
|
39
56
|
end
|
40
57
|
|
41
58
|
desc 'Install gems to local directory'
|
@@ -43,15 +60,12 @@ namespace :package do
|
|
43
60
|
# abort if version packaging does not exist on repository
|
44
61
|
abort "KPM #{VERSION} does not exists in the repository." unless gem_exists?
|
45
62
|
|
46
|
-
# Note! Must match TRAVELING_RUBY_VERSION above
|
47
|
-
expected_ruby_version = TRAVELING_RUBY_VERSION.split('-')[-1]
|
48
|
-
abort "You can only 'bundle install' using Ruby #{expected_ruby_version}, because that's what Traveling Ruby uses." if RUBY_VERSION !~ /#{Regexp.quote(expected_ruby_version)}/
|
49
63
|
sh 'rm -rf packaging/tmp'
|
50
64
|
sh 'mkdir -p packaging/tmp'
|
51
65
|
sh 'cp packaging/Gemfile packaging/tmp/'
|
52
66
|
sh "sed -i 's/VERSION/#{VERSION}/g' packaging/tmp/Gemfile"
|
53
67
|
|
54
|
-
sh
|
68
|
+
sh 'rm -rf packaging/vendor/ruby/2.*/bundler' # if multiple clones of same repo, may load in wrong one
|
55
69
|
|
56
70
|
Bundler.with_clean_env do
|
57
71
|
sh 'cd packaging/tmp && env BUNDLE_IGNORE_CONFIG=1 bundle install --path ../vendor --without development'
|
@@ -80,28 +94,42 @@ namespace :package do
|
|
80
94
|
end
|
81
95
|
end
|
82
96
|
|
83
|
-
file "packaging/
|
84
|
-
|
97
|
+
file "packaging/jruby-dist-#{JRUBY_VERSION}-bin.tar.gz" do
|
98
|
+
download_noarch_runtime
|
85
99
|
end
|
86
100
|
|
87
|
-
file "packaging/
|
88
|
-
|
101
|
+
file "packaging/portable-ruby-#{HOMEBREW_PORTABLE_RUBY_VERSION}.#{LINUX_X86_TARGET}.bottle.tar.gz" do
|
102
|
+
download_portable_runtime(LINUX_X86_TARGET)
|
89
103
|
end
|
90
104
|
|
91
|
-
file "packaging/
|
92
|
-
|
105
|
+
file "packaging/portable-ruby-#{HOMEBREW_PORTABLE_RUBY_VERSION}.#{OSX_X86_TARGET}.bottle.tar.gz" do
|
106
|
+
download_portable_runtime(OSX_X86_TARGET)
|
93
107
|
end
|
94
108
|
|
95
|
-
|
96
|
-
|
109
|
+
file "packaging/portable-ruby-#{HOMEBREW_PORTABLE_RUBY_VERSION}.#{OSX_ARM_TARGET}.bottle.tar.gz" do
|
110
|
+
download_portable_runtime(OSX_ARM_TARGET)
|
111
|
+
end
|
112
|
+
|
113
|
+
def create_package(target, package_dir_suffix)
|
114
|
+
pom_version = %r{<version>(.*)</version>}.match(File.read("#{__dir__}/../pom.xml"))[1]
|
115
|
+
package_dir = "#{PACKAGE_NAME}-#{pom_version}-#{package_dir_suffix}"
|
97
116
|
sh "rm -rf #{package_dir}"
|
98
117
|
sh "mkdir -p #{package_dir}/lib/ruby"
|
99
|
-
|
118
|
+
if target == NOARCH_TARGET
|
119
|
+
sh "tar -xzf packaging/jruby-dist-#{JRUBY_VERSION}-bin.tar.gz -C #{package_dir}/lib/ruby --strip-components 1"
|
120
|
+
else
|
121
|
+
sh "tar -xzf packaging/portable-ruby-#{HOMEBREW_PORTABLE_RUBY_VERSION}.#{target}.bottle.tar.gz -C #{package_dir}/lib/ruby --strip-components 2"
|
122
|
+
end
|
100
123
|
|
101
124
|
sh "cp packaging/kpm.sh #{package_dir}/kpm"
|
102
125
|
sh "chmod +x packaging/kpm.sh #{package_dir}/kpm"
|
103
126
|
|
104
127
|
sh "cp -pR packaging/vendor #{package_dir}/lib/"
|
128
|
+
if target == NOARCH_TARGET
|
129
|
+
# Need to tweak a few things to make it work with JRuby
|
130
|
+
sh "cp #{package_dir}/lib/ruby/bin/jruby #{package_dir}/lib/ruby/bin/ruby"
|
131
|
+
sh "mv #{package_dir}/lib/vendor/ruby #{package_dir}/lib/vendor/jruby"
|
132
|
+
end
|
105
133
|
|
106
134
|
sh "cp packaging/Gemfile* #{package_dir}/lib/vendor/"
|
107
135
|
sh "sed -i 's/VERSION/#{VERSION}/g' #{package_dir}/lib/vendor/Gemfile"
|
@@ -114,9 +142,14 @@ def create_package(target)
|
|
114
142
|
sh "rm -rf #{package_dir}"
|
115
143
|
end
|
116
144
|
|
117
|
-
def
|
145
|
+
def download_noarch_runtime
|
146
|
+
sh 'mkdir -p packaging && cd packaging && curl -L -O --fail ' \
|
147
|
+
"https://repo1.maven.org/maven2/org/jruby/jruby-dist/#{JRUBY_VERSION}/jruby-dist-#{JRUBY_VERSION}-bin.tar.gz"
|
148
|
+
end
|
149
|
+
|
150
|
+
def download_portable_runtime(target)
|
118
151
|
sh 'mkdir -p packaging && cd packaging && curl -L -O --fail ' \
|
119
|
-
"https://
|
152
|
+
"https://github.com/Homebrew/homebrew-portable-ruby/releases/download/#{HOMEBREW_PORTABLE_RUBY_VERSION}/portable-ruby-#{HOMEBREW_PORTABLE_RUBY_VERSION}.#{target}.bottle.tar.gz"
|
120
153
|
end
|
121
154
|
|
122
155
|
def gem_exists?
|
@@ -126,3 +159,9 @@ def gem_exists?
|
|
126
159
|
specification = YAML.load(response)
|
127
160
|
specification.instance_of?(Gem::Specification)
|
128
161
|
end
|
162
|
+
|
163
|
+
def ensure_ruby_version
|
164
|
+
# Note! Must match HOMEBREW_PORTABLE_RUBY_VERSION above
|
165
|
+
expected_ruby_version = HOMEBREW_PORTABLE_RUBY_VERSION.split('_')[0]
|
166
|
+
abort "You can only 'bundle install' using Ruby #{expected_ruby_version}, because that's what homebrew-portable-ruby uses." if RUBY_VERSION !~ /#{Regexp.quote(expected_ruby_version)}/
|
167
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kill Bill core team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.3.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '3.9'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.88.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.88.0
|
111
125
|
description: A package manager for Kill Bill.
|
112
126
|
email: killbilling-users@googlegroups.com
|
113
127
|
executables:
|
@@ -168,7 +182,6 @@ files:
|
|
168
182
|
- packaging/bundler-config
|
169
183
|
- packaging/kpm.sh
|
170
184
|
- pom.xml
|
171
|
-
- release.sh
|
172
185
|
- spec/kpm/remote/base_artifact_spec.rb
|
173
186
|
- spec/kpm/remote/base_installer_spec.rb
|
174
187
|
- spec/kpm/remote/cloudsmith_api_calls_spec.rb
|
@@ -223,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
236
|
- !ruby/object:Gem::Version
|
224
237
|
version: '0'
|
225
238
|
requirements: []
|
226
|
-
rubygems_version: 3.0.
|
239
|
+
rubygems_version: 3.0.3.1
|
227
240
|
signing_key:
|
228
241
|
specification_version: 4
|
229
242
|
summary: Kill Bill package manager.
|
data/release.sh
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
set -e
|
4
|
-
|
5
|
-
BUNDLE=${BUNDLE-"bundle exec"}
|
6
|
-
MVN=${MVN-"mvn"}
|
7
|
-
|
8
|
-
if [ 'GNU' != "$(tar --help | grep GNU | head -1 | awk '{print $1}')" ]; then
|
9
|
-
echo 'Unable to release: make sure to use GNU tar'
|
10
|
-
exit 1
|
11
|
-
fi
|
12
|
-
|
13
|
-
# See TRAVELING_RUBY_VERSION in tasks/package.rake
|
14
|
-
if [[ "$(ruby --version 2>&1 | tail -1 | awk '{print $2}')" != 2.2.2* ]]; then
|
15
|
-
echo 'Ruby version 2.2.2 is required'
|
16
|
-
exit 1
|
17
|
-
fi
|
18
|
-
|
19
|
-
VERSION=`grep -E '<version>([0-9]+\.[0-9]+\.[0-9]+)</version>' pom.xml | sed 's/[\t \n]*<version>\(.*\)<\/version>[\t \n]*/\1/'`
|
20
|
-
if [[ -z "$NO_RELEASE" && "$VERSION" != "$(ruby -r./lib/kpm/version.rb -e "print KPM::VERSION")" ]]; then
|
21
|
-
echo 'Unable to release: make sure the versions in pom.xml and VERSION match'
|
22
|
-
exit 1
|
23
|
-
fi
|
24
|
-
|
25
|
-
if [[ -z "$NO_RELEASE" ]]; then
|
26
|
-
echo 'Pushing the gem to Rubygems'
|
27
|
-
$BUNDLE rake release
|
28
|
-
fi
|
29
|
-
|
30
|
-
# Wait for the gem to be propagated
|
31
|
-
sleep 15
|
32
|
-
|
33
|
-
$BUNDLE rake package
|
34
|
-
|
35
|
-
if [[ -z "$NO_RELEASE" ]]; then
|
36
|
-
GOAL=gpg:sign-and-deploy-file
|
37
|
-
REPOSITORY_ID=ossrh-releases
|
38
|
-
URL=https://oss.sonatype.org/service/local/staging/deploy/maven2/
|
39
|
-
REPO_VERSION=$VERSION
|
40
|
-
else
|
41
|
-
GOAL=deploy:deploy-file
|
42
|
-
REPOSITORY_ID=sonatype-nexus-snapshots
|
43
|
-
URL=https://oss.sonatype.org/content/repositories/snapshots/
|
44
|
-
REPO_VERSION="$VERSION-SNAPSHOT"
|
45
|
-
fi
|
46
|
-
|
47
|
-
echo "Pushing artifacts to Maven Central"
|
48
|
-
$MVN $GOAL \
|
49
|
-
-DgroupId=org.kill-bill.billing.installer \
|
50
|
-
-DartifactId=kpm \
|
51
|
-
-Dversion=$REPO_VERSION \
|
52
|
-
-Dpackaging=tar.gz \
|
53
|
-
-DrepositoryId=$REPOSITORY_ID \
|
54
|
-
-Durl=$URL \
|
55
|
-
-Dfile=kpm-$VERSION-linux-x86_64.tar.gz \
|
56
|
-
-Dclassifier=linux-x86_64 \
|
57
|
-
-Dfiles=kpm-$VERSION-linux-x86.tar.gz,kpm-$VERSION-osx.tar.gz \
|
58
|
-
-Dclassifiers=linux-x86,osx \
|
59
|
-
-Dtypes=tar.gz,tar.gz \
|
60
|
-
-DpomFile=pom.xml
|