Sha256: 310a090796c5125c3700d25169762ab09f17b04a350d89ec50ece33addd40d84
Contents?: true
Size: 934 Bytes
Versions: 55
Compression:
Stored size: 934 Bytes
Contents
module Softcover module Commands module Deployment include Softcover::Utils extend self # Deploy a book by building and publishing it. # The deploy steps can be customized using `.poly-publish` # in the book project's home directory. def deploy! if File.exist?('.softcover-deploy') && !custom_commands.empty? execute custom_commands else execute default_commands end end # Returns the default commands. def default_commands commands(['softcover build:all', 'softcover build:preview', 'softcover publish']) end # Returns custom commands (if any). def custom_commands commands(File.readlines(deploy_config).map(&:strip)) end # Returns the filename for configuring `softcover deploy`. def deploy_config '.softcover-deploy' end end end end
Version data entries
55 entries across 55 versions & 2 rubygems