Created
April 3, 2023 15:30
-
-
Save jimworm/fcd73db4b01bb9fbe4497ccd70351e45 to your computer and use it in GitHub Desktop.
using stage configuration variables in capistrano append
This file contains hidden or 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
# abuse capistrano variable validators to | |
# use stage configs with the non-lazy #append | |
# this bit sets a global config before the stage is loaded | |
append :linked_files, 'config/database.yml', 'config/other.yml' | |
# this bit will run after the variable you need is set | |
validate :rails_env do |_, value| | |
append :linked_files, "config/credentials/#{value}.key" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment