forked from pivotal-sprout/sprout-osx-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# node.default["github_for_mac_download_uri"]="https://central.github.com/mac/latest" | ||
# too bad latest is redirect to url with spaces in the name :( | ||
node.default["github_for_mac_download_uri"]="https://github-central.s3.amazonaws.com/mac%2FGitHub%20for%20Mac%2087.zip" | ||
node.default["github_for_mac_download_uri"]="https://github-central.s3.amazonaws.com/mac%2FGitHub%20for%20Mac%2096.zip" | ||
node.default["github_for_mac_sha"]="0411b4e57b795fb4e12b8d14751a95ec49db4c5bc1d67f0f842875059350d710" | ||
node.default["github_for_mac_app_path"]="/Applications/GitHub.app" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
unless File.exists?(node["github_for_mac_app_path"]) | ||
|
||
remote_file "#{Chef::Config[:file_cache_path]}/github_for_mac.zip" do | ||
source node["github_for_mac_download_uri"] | ||
owner WS_USER | ||
checksum "b21158e5d76583097a8d7f6d2f6f5cea0ff78852711390ec6c05f94625ec0248" | ||
end | ||
remote_file "#{Chef::Config[:file_cache_path]}/github_for_mac.zip" do | ||
source node["github_for_mac_download_uri"] | ||
owner WS_USER | ||
checksum node["github_for_mac_sha"] | ||
not_if { File.exists?("#{Chef::Config[:file_cache_path]}/github_for_mac.zip") } | ||
end | ||
|
||
execute "unzip github_for_mac" do | ||
command "unzip #{Chef::Config[:file_cache_path]}/github_for_mac.zip -d #{Chef::Config[:file_cache_path]}/" | ||
user WS_USER | ||
end | ||
execute "unzip github_for_mac" do | ||
command "unzip #{Chef::Config[:file_cache_path]}/github_for_mac.zip -d #{Chef::Config[:file_cache_path]}/" | ||
user WS_USER | ||
not_if { File.exists?("#{Chef::Config[:file_cache_path]}/GitHub.app") } | ||
end | ||
|
||
execute "copy github_for_mac to /Applications" do | ||
command "mv #{Chef::Config[:file_cache_path]}/GitHub.app #{Regexp.escape(node["github_for_mac_app_path"])}" | ||
user WS_USER | ||
group "admin" | ||
end | ||
execute "copy github_for_mac to /Applications" do | ||
command "mv #{Chef::Config[:file_cache_path]}/GitHub.app #{Regexp.escape(node["github_for_mac_app_path"])}" | ||
user WS_USER | ||
group "admin" | ||
not_if { File.exists?(node["github_for_mac_app_path"]) } | ||
end | ||
|
||
ruby_block "test to see if GitHub.app was installed" do | ||
block do | ||
raise "GitHub.app was not installed" unless File.exists?(node["github_for_mac_app_path"]) | ||
end | ||
ruby_block "test to see if GitHub.app was installed" do | ||
block do | ||
raise "GitHub.app was not installed" unless File.exists?(node["github_for_mac_app_path"]) | ||
end | ||
|
||
end |