Sha256: 38aac3418b4bc5ac14169df575071f47396628b268891feac3c2aaccc8618a9a
Contents?: true
Size: 1.3 KB
Versions: 13
Compression:
Stored size: 1.3 KB
Contents
# frozen_string_literal: true require "yaml" require "json" require "groundskeeper" desc "Sets up project details." # rubocop:disable Metrics/BlockLength task :before_run do application = %x(basename `git rev-parse --show-toplevel`).strip! unless Groundskeeper::Project.available_applications.include? application raise "must be inside application repo (currently in #{application}). " \ "available applications: " + Groundskeeper::Project.available_applications end project = Groundskeeper::Project.build(application) set :project, project set :application_name, application set :domain, project.full_dns(fetch(:stage)) set :user, "deploy" set :repository, project.repo_url set :deploy_to, project.deploy_to set :forward_agent, true set :bundle_path, "bundle" set :rvm_ruby_version, project.rvm_ruby_version set :rvm_type, :system # On each deploy, prompt for the tag puts "Looking up tags for project #{application}... (#{project.repo_url})" tags = project.tags raise "There must be a tagged release prior to deploying." if tags.count.zero? tag = ENV["tag"] unless tags.include? tag raise "Tag \"#{tag}\" not found. Available tags:\n #{tags.join("\n")}" end set :branch, "master" set :tag, "tags/#{tag}" end # rubocop:enable Metrics/BlockLength
Version data entries
13 entries across 13 versions & 1 rubygems