mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
move the "dots" rake tasks to separate file
This commit is contained in:
parent
14680c582c
commit
bd45e91d0f
2 changed files with 40 additions and 38 deletions
39
Rakefile
39
Rakefile
|
|
@ -4,6 +4,7 @@ require 'puppetlabs_spec_helper/rake_tasks'
|
|||
require 'puppet-lint/tasks/puppet-lint'
|
||||
require 'tty-command'
|
||||
require 'yamllint/rake_task'
|
||||
require_relative 'bin/rake_tasks.rb'
|
||||
|
||||
exclude_paths = [
|
||||
'pkg/**/*',
|
||||
|
|
@ -63,41 +64,3 @@ task :tests do
|
|||
Rake::Task[:rubocop].invoke
|
||||
Rake::Task[:spec].invoke
|
||||
end
|
||||
|
||||
desc 'Run dots'
|
||||
task :dots do
|
||||
ruby 'bin/dots.rb'
|
||||
end
|
||||
|
||||
namespace 'dots' do
|
||||
cmd = TTY::Command.new
|
||||
|
||||
desc 'Run r10k'
|
||||
task :run_r10k do
|
||||
command = 'bundle exec r10k puppetfile install \
|
||||
--puppetfile ~/.dotfiles/puppet/production/Puppetfile -v'
|
||||
cmd.run(command)
|
||||
end
|
||||
|
||||
desc 'Run Puppet'
|
||||
task :run_puppet do
|
||||
command = 'bundle exec puppet apply \
|
||||
--environmentpath ~/.dotfiles/puppet \
|
||||
~/.dotfiles/puppet/production/manifests/site.pp'
|
||||
cmd.run(command)
|
||||
end
|
||||
|
||||
desc 'Run Puppet (noop)'
|
||||
task :run_puppet_noop do
|
||||
command = 'bundle exec puppet apply \
|
||||
--environmentpath ~/.dotfiles/puppet \
|
||||
~/.dotfiles/puppet/production/manifests/site.pp --noop'
|
||||
cmd.run(command)
|
||||
end
|
||||
|
||||
desc 'Install Vundle Plugins'
|
||||
task :vim_plugins do
|
||||
command = 'vim +PluginInstall +qall'
|
||||
cmd.run(command)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
39
bin/rake_tasks.rb
Normal file
39
bin/rake_tasks.rb
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
desc 'Run dots'
|
||||
task :dots do
|
||||
ruby 'bin/dots.rb'
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/BlockLength
|
||||
namespace 'dots' do
|
||||
cmd = TTY::Command.new
|
||||
|
||||
desc 'Run r10k'
|
||||
task :run_r10k do
|
||||
command = 'bundle exec r10k puppetfile install \
|
||||
--puppetfile ~/.dotfiles/puppet/production/Puppetfile -v'
|
||||
cmd.run(command)
|
||||
end
|
||||
|
||||
desc 'Run Puppet'
|
||||
task :run_puppet do
|
||||
command = 'bundle exec puppet apply \
|
||||
--environmentpath ~/.dotfiles/puppet \
|
||||
~/.dotfiles/puppet/production/manifests/site.pp'
|
||||
cmd.run(command)
|
||||
end
|
||||
|
||||
desc 'Run Puppet (noop)'
|
||||
task :run_puppet_noop do
|
||||
command = 'bundle exec puppet apply \
|
||||
--environmentpath ~/.dotfiles/puppet \
|
||||
~/.dotfiles/puppet/production/manifests/site.pp --noop'
|
||||
cmd.run(command)
|
||||
end
|
||||
|
||||
desc 'Install Vundle Plugins'
|
||||
task :vim_plugins do
|
||||
command = 'vim +PluginInstall +qall'
|
||||
cmd.run(command)
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/BlockLength
|
||||
Loading…
Add table
Add a link
Reference in a new issue