Upgrade nodejs to the latest version from the repo
This is possible in newer versions of the nodejs cookbook, by setting the `node["nodejs"]["package_action"]["nodejs"]` attribute to `:upgrade`
This commit is contained in:
@@ -18,15 +18,18 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
Chef::Recipe.send(:include, NodeJs::Helper)
|
||||
Chef::DSL::Recipe.include NodeJs::Helper
|
||||
|
||||
include_recipe 'build-essential'
|
||||
build_essential 'install build tools'
|
||||
|
||||
case node['platform_family']
|
||||
when 'rhel', 'fedora', 'amazon'
|
||||
package %w(openssl-devel tar)
|
||||
# The ark resource uses and requires python2 for builds
|
||||
package %w(openssl-devel python2 tar)
|
||||
when 'debian'
|
||||
package 'libssl-dev'
|
||||
package %w(libssl-dev python)
|
||||
when 'suse'
|
||||
package %w(python)
|
||||
end
|
||||
|
||||
version = "v#{node['nodejs']['version']}/"
|
||||
@@ -42,4 +45,5 @@ ark archive_name do
|
||||
checksum node['nodejs']['source']['checksum']
|
||||
make_opts ["-j #{node['nodejs']['make_threads']}"]
|
||||
action :install_with_make
|
||||
environment(PYTHON: 'python2')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user