Rakefile: add "nanoc:clean" task
This commit is contained in:
parent
172f25bd62
commit
7c58d7c82e
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "bundler/setup"
|
||||
require "ryo"
|
||||
require_relative "lib/tasks"
|
||||
include Tasks
|
||||
|
||||
|
@ -8,6 +9,11 @@ namespace :nanoc do
|
|||
task :compile do
|
||||
sh "nanoc co"
|
||||
end
|
||||
|
||||
task :clean do
|
||||
build_dir = Ryo.from(YAML.load_file("./nanoc.yaml")).output_dir
|
||||
sh "rm -rf #{build_dir}"
|
||||
end
|
||||
end
|
||||
task build: "nanoc:compile"
|
||||
|
||||
|
@ -22,7 +28,7 @@ namespace :deploy do
|
|||
Deploy::Local.call
|
||||
end
|
||||
|
||||
task remote: ["nanoc:compile"] do
|
||||
task remote: ["nanoc:clean", "nanoc:compile"] do
|
||||
require "dotenv"
|
||||
Dotenv.load
|
||||
Deploy::Remote.call
|
||||
|
|
Loading…
Reference in a new issue