Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 78 lines (65 sloc) 2.316 kB
1d5f48f @kalbasit Rakefile: Fix the root path.
kalbasit authored
1 ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__)))
902f818 @kalbasit Janus: Go through all files and change all occurences of vimius to ja…
kalbasit authored
2 $: << File.join(ROOT_PATH, 'janus', 'ruby')
50fb70e @kalbasit Merge branch 'add_hammer' into experimental
kalbasit authored
3
902f818 @kalbasit Janus: Go through all files and change all occurences of vimius to ja…
kalbasit authored
4 require 'janus'
4be9c1a @kalbasit Really clean the janus folder, those pesky removed submodules should …
kalbasit authored
5 require 'fileutils'
902f818 @kalbasit Janus: Go through all files and change all occurences of vimius to ja…
kalbasit authored
6 include Janus
25da4c2 @kalbasit Rakefile: Add support for plugin installation.
kalbasit authored
7
0839615 @kalbasit Rakefile: Make sure ~/.vimrc before linking, also simplifies it (copi…
kalbasit authored
8 desc "link ViM configuration files."
9 task :link_vim_conf_files do
10 %w[ vimrc gvimrc ].each do |file|
11 dest = expand("~/.#{file}")
12 unless File.exist?(dest)
902f818 @kalbasit Janus: Go through all files and change all occurences of vimius to ja…
kalbasit authored
13 ln_s(expand("../janus/vim/#{file}", __FILE__), dest)
0839615 @kalbasit Rakefile: Make sure ~/.vimrc before linking, also simplifies it (copi…
kalbasit authored
14 end
15 end
78dfa8d Add ZoomWin, turn off swap files, and add a Rakefile to set things up
tomhuda authored
16 end
17
357dbd4 @kalbasit Rakefile: Add a task to easly update all submodules.
kalbasit authored
18 namespace :dev do
19 desc "Update submodules"
20 task :update_submodules do
c07a034 @kalbasit Use "git submodule foreach" to update submodules
kalbasit authored
21 sh "git submodule foreach git pull origin master"
357dbd4 @kalbasit Rakefile: Add a task to easly update all submodules.
kalbasit authored
22 end
11e3585 @kalbasit Rakefile: Add a task to remove whitespace errors, I hate whitespace e…
kalbasit authored
23
15225f8 @kalbasit Rakefile: Bad copy/paste got me tabs in the Rakefile Yakkk..
kalbasit authored
24 # Taken from RefineryCMD
25 # https://github.com/resolve/refinerycms/blob/master/core/lib/tasks/refinery.rake
26 desc 'Removes trailing whitespace across the entire application.'
27 task :whitespace do
28 require 'rbconfig'
29 if RbConfig::CONFIG['host_os'] =~ /linux/
30 sh %{find . -name '*.*rb' -o -name '*.*vim' -exec sed -i 's/\t/ /g' {} \\; -exec sed -i 's/ *$//g' {} \\; }
31 elsif RbConfig::CONFIG['host_os'] =~ /darwin/
32 sh %{find . -name '*.*rb' -o -name '*.*vim' -exec sed -i '' 's/\t/ /g' {} \\; -exec sed -i '' 's/ *$//g' {} \\; }
33 else
34 puts "This doesn't work on systems other than OSX or Linux. Please use a custom whitespace tool for your platform '#{RbConfig::CONFIG["host_os"]}'."
35 end
36 end
357dbd4 @kalbasit Rakefile: Add a task to easly update all submodules.
kalbasit authored
37 end
38
d07d8ea @kalbasit Rakefile: Create backup and temp folders.
kalbasit authored
39 desc "Create necessary folders."
40 task :folders do
902f818 @kalbasit Janus: Go through all files and change all occurences of vimius to ja…
kalbasit authored
41 Janus::VIM.folders.each do |folder|
d07d8ea @kalbasit Rakefile: Create backup and temp folders.
kalbasit authored
42 mkdir_p folder
43 end
44 end
45
78dfa8d Add ZoomWin, turn off swap files, and add a Rakefile to set things up
tomhuda authored
46 task :update do
8273d8b @kalbasit Rakefile: Fix a typo.
kalbasit authored
47 puts "Cleaning the janus folder"
f2b2662 @zerowidth Remove custom directory in favor of ~/.janus; update documentation
zerowidth authored
48 `git clean -xdf -- janus &> /dev/null`
4be9c1a @kalbasit Really clean the janus folder, those pesky removed submodules should …
kalbasit authored
49 `git ls-files --exclude-standard --others -- janus`.split("\n").each do |untracked|
50 FileUtils.rm_rf File.expand_path(untracked.chomp, File.dirname(__FILE__))
51 end
2a07d9c @kalbasit Rakefile: Do not be that much verbose and synchronise submodules urls.
kalbasit authored
52
53 puts "Pulling latest changes"
30f98fe @kalbasit Rakefile: Let the user see the STDERR.
kalbasit authored
54 `git pull > /dev/null`
2a07d9c @kalbasit Rakefile: Do not be that much verbose and synchronise submodules urls.
kalbasit authored
55
4be9c1a @kalbasit Really clean the janus folder, those pesky removed submodules should …
kalbasit authored
56 puts "Cleaning the janus folder"
57 `git clean -xdf -- janus &> /dev/null`
58 `git ls-files --exclude-standard --others -- janus`.split("\n").each do |untracked|
59 FileUtils.rm_rf File.expand_path(untracked.chomp, File.dirname(__FILE__))
60 end
61
2a07d9c @kalbasit Rakefile: Do not be that much verbose and synchronise submodules urls.
kalbasit authored
62 puts "Synchronising submodules urls"
30f98fe @kalbasit Rakefile: Let the user see the STDERR.
kalbasit authored
63 `git submodule sync > /dev/null`
2a07d9c @kalbasit Rakefile: Do not be that much verbose and synchronise submodules urls.
kalbasit authored
64
65 puts "Updating the submodules"
30f98fe @kalbasit Rakefile: Let the user see the STDERR.
kalbasit authored
66 `git submodule update --init > /dev/null`
78dfa8d Add ZoomWin, turn off swap files, and add a Rakefile to set things up
tomhuda authored
67 end
68
ab561fd @kalbasit Rakefile: Pull changes first and invoke 'rake install' from within th…
kalbasit authored
69 task :install => [:folders, :link_vim_conf_files] do
70 # Dummy task, real work is done with the hooks.
25da4c2 @kalbasit Rakefile: Add support for plugin installation.
kalbasit authored
71 end
72
902f818 @kalbasit Janus: Go through all files and change all occurences of vimius to ja…
kalbasit authored
73 desc "Install or Update Janus."
ab561fd @kalbasit Rakefile: Pull changes first and invoke 'rake install' from within th…
kalbasit authored
74 task :default do
75 sh "rake update"
76 sh "rake install"
77 end
Something went wrong with that request. Please try again.