Update upstream cookbooks
This commit is contained in:
15
cookbooks/build-essential/libraries/_msys_helper.rb
Normal file
15
cookbooks/build-essential/libraries/_msys_helper.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
module BuildEssential
|
||||
module MsysHelper
|
||||
#
|
||||
# This function returns a struct representing an
|
||||
# msys package. It has two fields: url and checksum
|
||||
#
|
||||
# @return [OpenStruct]
|
||||
#
|
||||
def msys_p(url, checksum)
|
||||
OpenStruct.new(url: url, checksum: checksum)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Chef::Recipe.send(:include, BuildEssential::MsysHelper)
|
||||
@@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: build-essential
|
||||
# Library:: timing
|
||||
#
|
||||
# Copyright 2014, Chef Software, Inc.
|
||||
# Copyright 2014-2016, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: build-essential
|
||||
# Library:: xcode_command_line_tools
|
||||
#
|
||||
# Copyright 2014, Chef Software, Inc.
|
||||
# Copyright 2014-2016, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -29,10 +29,12 @@ class Chef
|
||||
def initialize(name, run_context = nil)
|
||||
super
|
||||
|
||||
@provider = case node['platform_version'].to_f
|
||||
when 10.7, 10.8
|
||||
# => Break down SemVer
|
||||
major, minor, _patch = node['platform_version'].split('.').map { |v| String(v) }
|
||||
@provider = case [major, minor].join('.')
|
||||
when '10.7', '10.8'
|
||||
Provider::XcodeCommandLineToolsFromDmg
|
||||
when 10.9, 10.10
|
||||
when '10.9', '10.10', '10.11'
|
||||
Provider::XcodeCommandLineToolsFromSoftwareUpdate
|
||||
else
|
||||
Chef::Log.warn <<-EOH
|
||||
@@ -112,7 +114,7 @@ class Chef
|
||||
when 10.8
|
||||
'http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_mountain_lion_march_2014.dmg'
|
||||
else
|
||||
fail "Unknown DMG download URL for OSX #{node['platform_version']}"
|
||||
raise "Unknown DMG download URL for OSX #{node['platform_version']}"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user