summaryrefslogtreecommitdiff
path: root/lib/license/management
diff options
context:
space:
mode:
Diffstat (limited to 'lib/license/management')
-rw-r--r--lib/license/management/shell.rb11
-rw-r--r--lib/license/management/tool_box.rb18
-rw-r--r--lib/license/management/version.rb2
3 files changed, 15 insertions, 16 deletions
diff --git a/lib/license/management/shell.rb b/lib/license/management/shell.rb
index 6a6f0b6..c947a5c 100644
--- a/lib/license/management/shell.rb
+++ b/lib/license/management/shell.rb
@@ -16,6 +16,7 @@ module License
keytool: '/opt/asdf/bin/asdf exec keytool',
mono: '/opt/asdf/installs/mono/6.8.0.123/bin/mono',
mvn: '/opt/asdf/bin/asdf exec mvn',
+ npm: '/opt/asdf/bin/asdf exec npm',
nuget: '/opt/asdf/installs/mono/6.8.0.123/bin/nuget.exe',
pip: '/opt/asdf/bin/asdf exec pip',
ruby: '/opt/asdf/bin/asdf exec ruby',
@@ -64,15 +65,15 @@ module License
def trust!(certificate)
custom_certificate_path.write(certificate)
Dir.chdir custom_certificate_path.dirname do
- execute([:awk, SPLIT_SCRIPT, '<', custom_certificate_path])
- execute('update-ca-certificates -v')
+ execute([:awk, SPLIT_SCRIPT, '<', custom_certificate_path], capture: false)
+ execute('update-ca-certificates -v', capture: false)
Dir.glob('custom.*.crt').each do |path|
- execute([:openssl, :x509, '-in', File.expand_path(path), '-text', '-noout'])
+ execute([:openssl, :x509, '-in', File.expand_path(path), '-text', '-noout'], capture: false)
end
end
- execute([:cp, custom_certificate_path.to_s, "/usr/lib/ssl/certs/"])
- execute([:c_rehash, '-v'])
+ execute([:cp, custom_certificate_path.to_s, "/usr/lib/ssl/certs/"], capture: false)
+ execute([:c_rehash, '-v'], capture: false)
end
def present?(item)
diff --git a/lib/license/management/tool_box.rb b/lib/license/management/tool_box.rb
index 6906cb5..dc63f0e 100644
--- a/lib/license/management/tool_box.rb
+++ b/lib/license/management/tool_box.rb
@@ -16,17 +16,15 @@ module License
Dir.chdir(project_path) do
deb = deb_for(tool, version)
if deb&.exist?
- ::License::Management.logger.error("Installing #{deb} ...")
shell.execute([:dpkg, '-i', deb], capture: false)
else
- ::License::Management.logger.error("Installing #{version} via asdf ...")
- shell.execute([:asdf, "plugin-update", tool.to_s], env: env)
- shell.execute(['/opt/asdf/plugins/nodejs/bin/import-release-team-keyring']) if tool == :nodejs
+ shell.execute([:asdf, "plugin-update", tool.to_s], env: env, capture: false)
+ shell.execute(['/opt/asdf/plugins/nodejs/bin/import-release-team-keyring'], capture: false) if tool == :nodejs
end
install_common_libraries(env: env) if C_BASED_TOOLS.include?(tool.to_sym)
shell.execute([:asdf, :install, tool.to_s, version], env: env, capture: false)
- shell.execute([:asdf, :local, tool.to_s, version], env: env)
- shell.execute([:asdf, :reshim], env: env)
+ shell.execute([:asdf, :local, tool.to_s, version], env: env, capture: false)
+ shell.execute([:asdf, :reshim], env: env, capture: false)
end
install_certificates_into_java_keystore(env, version) if tool == :java
end
@@ -56,8 +54,8 @@ module License
Dir.chdir(project_path) do
return unless deb_for(tool, version)&.exist?
- shell.execute([:dpkg, '-r', "#{tool}-#{version}"])
- shell.execute([:asdf, :reshim])
+ shell.execute([:dpkg, '-r', "#{tool}-#{version}"], capture: false)
+ shell.execute([:asdf, :reshim], capture: false)
end
end
@@ -124,8 +122,8 @@ module License
Dir.chdir shell.custom_certificate_path.dirname do
Dir.glob('custom.*.crt').each do |path|
- shell.execute([:keytool, '-importcert', '-alias', Time.now.to_i, '-file', File.expand_path(path), '-trustcacerts', '-noprompt', '-storepass', 'changeit', '-keystore', keystore_path], env: env)
- shell.execute([:keytool, '-list', '-v', '-storepass changeit', '-keystore', keystore_path], env: env)
+ shell.execute([:keytool, '-importcert', '-alias', Time.now.to_i, '-file', File.expand_path(path), '-trustcacerts', '-noprompt', '-storepass', 'changeit', '-keystore', keystore_path], env: env, capture: false)
+ shell.execute([:keytool, '-list', '-v', '-storepass changeit', '-keystore', keystore_path], env: env, capture: false)
end
end
end
diff --git a/lib/license/management/version.rb b/lib/license/management/version.rb
index 1645717..7bd04dd 100644
--- a/lib/license/management/version.rb
+++ b/lib/license/management/version.rb
@@ -2,6 +2,6 @@
module License
module Management
- VERSION = '3.28.2'
+ VERSION = '3.28.3'
end
end