21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-04-27 14:30:49 +02:00

Only keep 5 releases in production/staging

This commit is contained in:
Jérémy Lecour 2022-02-13 09:39:03 +01:00 committed by Jérémy Lecour
parent b2976c4e5f
commit 8f28c34f93
3 changed files with 11 additions and 0 deletions

View file

@ -3,6 +3,7 @@
staging:
deploy_to: /var/www/my_app_name
keep_releases: 5
servers:
-
host: staging.example.com
@ -14,6 +15,7 @@ staging:
production:
deploy_to: /var/www/my_app_name
keep_releases: 5
servers:
-
host: www.example.com

View file

@ -13,6 +13,11 @@ end
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, config.fetch("deploy_to")
set :branch, "production"
if config.has_key?(:keep_releases)
set :keep_releases, config.fetch("keep_releases").to_i
end
# role-based syntax
# ==================

View file

@ -16,6 +16,10 @@ end
set :deploy_to, config.fetch("deploy_to")
set :branch, "staging"
if config.has_key?(:keep_releases)
set :keep_releases, config.fetch("keep_releases").to_i
end
# role-based syntax
# ==================