module Softcover::Commands::Deployment
Public Instance Methods
custom_commands()
click to toggle source
Returns custom commands (if any).
# File lib/softcover/commands/deployment.rb, line 29 def custom_commands commands(File.readlines(deploy_config).map(&:strip)) end
default_commands()
click to toggle source
Returns the default commands.
# File lib/softcover/commands/deployment.rb, line 19 def default_commands if article? commands(['softcover build:all', 'softcover publish']) else commands(['softcover build:all', 'softcover build:preview', 'softcover publish']) end end
deploy!()
click to toggle source
Deploy a book by building and publishing it. The deploy steps can be customized using `.softcover-publish` in the book project's home directory.
# File lib/softcover/commands/deployment.rb, line 10 def deploy! if File.exist?('.softcover-deploy') && !custom_commands.empty? execute custom_commands else execute default_commands end end
deploy_config()
click to toggle source
Returns the filename for configuring `softcover deploy`.
# File lib/softcover/commands/deployment.rb, line 34 def deploy_config '.softcover-deploy' end