lib/dogids/deploy/web.rb in dogids-cli-0.0.32 vs lib/dogids/deploy/web.rb in dogids-cli-0.0.33

- old
+ new

@@ -8,11 +8,11 @@ print_heading("Deploying dogids.com") # Get each production server matching "web" for deploy server_addresses = [] production_servers = get_config_url("production") - production_servers.map |key, ip_address| + production_servers.map do |key, ip_address| if key.include? "web" server_addresses << key end end @@ -36,17 +36,17 @@ print_command("Updating file permissions") ssh.exec!(web_update_permissions_command) do |_channel, _stream, data| print_command(data) end - + git_sha = "Unknown" ssh.exec!(web_git_get_sha) do |_channel, _stream, data| git_sha = data.strip end print_command("Current git SHA: #{git_sha}") - + print_command("Sending release to sentry") ssh.exec!(web_sentry_create_release(git_sha)) do |_channel, _stream, data| print_command(data) end ssh.exec!(web_sentry_set_commits(git_sha)) do |_channel, _stream, data| @@ -87,11 +87,11 @@ commands << "sudo chown dogids:www-data -R resources" commands << "sudo chown dogids:www-data -R templates" commands << "git pull origin master" commands.join("&& ") end - + def web_git_get_sha commands = [] commands << "cd /home/dogids/apps/dogids.com" commands << "git log --pretty='%H' -n1 HEAD" commands.join("&& ") @@ -125,32 +125,32 @@ commands << "sudo chmod 775 -R #{full_path}" end commands.join("&& ") end - + ### SENTRY COMMANDS ### def web_sentry_create_release(git_sha) commands = [] commands << "cd /home/dogids/apps/dogids.com" commands << "sentry-cli releases new #{git_sha}" commands.join(" && ") end - + def web_sentry_set_commits(git_sha) commands = [] commands << "cd /home/dogids/apps/dogids.com" commands << "sentry-cli releases set-commits #{git_sha} --auto" commands.join(" && ") end - + def web_sentry_finalize(git_sha) commands = [] commands << "cd /home/dogids/apps/dogids.com" commands << "sentry-cli releases finalize #{git_sha}" commands.join(" && ") end - + def web_sentry_deploy(git_sha) commands = [] commands << "cd /home/dogids/apps/dogids.com" commands << "sentry-cli releases deploys #{git_sha} new -e production" commands.join(" && ")