21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-05-10 20:48:39 +02:00

Use string keys for Capistrano configuration

This commit is contained in:
Jérémy Lecour 2022-02-13 20:24:25 +01:00 committed by Jérémy Lecour
parent f37cc2abe4
commit e9c3067b30
2 changed files with 3 additions and 2 deletions

View file

@ -1,3 +1,4 @@
require 'yaml'
# server-based syntax # server-based syntax
# ====================== # ======================
# Defines a single server with a list of roles and multiple properties. # Defines a single server with a list of roles and multiple properties.
@ -15,7 +16,7 @@ end
set :deploy_to, config.fetch("deploy_to") set :deploy_to, config.fetch("deploy_to")
set :branch, "production" set :branch, "production"
if config.has_key?(:keep_releases) if config.has_key?("keep_releases")
set :keep_releases, config.fetch("keep_releases").to_i set :keep_releases, config.fetch("keep_releases").to_i
end end

View file

@ -16,7 +16,7 @@ end
set :deploy_to, config.fetch("deploy_to") set :deploy_to, config.fetch("deploy_to")
set :branch, "staging" set :branch, "staging"
if config.has_key?(:keep_releases) if config.has_key?("keep_releases")
set :keep_releases, config.fetch("keep_releases").to_i set :keep_releases, config.fetch("keep_releases").to_i
end end