Browse Source

removed Rakefile from repo

master
Lokesh Dhakar 8 years ago
parent
commit
48693ec76d
3 changed files with 3 additions and 76 deletions
  1. +2
    -1
      .gitignore
  2. +1
    -2
      README.markdown
  3. +0
    -73
      Rakefile

+ 2
- 1
.gitignore View File

@@ -18,4 +18,5 @@ Thumbs.db
# Software files #
######################
.espresso*
.sass-cache/*
.sass-cache/*
Rakefile

+ 1
- 2
README.markdown View File

@@ -1,8 +1,7 @@
##Lightbox2
by Lokesh Dhakar | [lokeshdhakar.com](http://www.lokeshdhakar.com) | [twitter.com/lokeshdhakar](http://twitter.com/lokeshdhakar)


###Info
###Information and support
For examples, downloads, and information on using Lightbox, visit the Lightbox2 homepage:
[http://lokeshdhakar.com/projects/lightbox2/](http://lokeshdhakar.com/projects/lightbox2/)



+ 0
- 73
Rakefile View File

@@ -1,73 +0,0 @@
## -- Rsync Deploy config -- ##
ssh_user = "lokesh@lokesh.webfactional.com"
ssh_port = "22"
document_root = "~/webapps/lokeshdhakar/projects/lightbox2/"
rsync_delete = true
deploy_default = "rsync"

## -- Misc Configs -- ##
sass_dir = "sass" # sass file directory
css_dir = "css" # compiled css directory
coffeescript_dir = "coffee" # coffeescript file directory
js_dir = "js" # compiled js directory

desc "Watches for SASS and Coffeescript file changes to compile."
task :watch do
puts "Starting to watch source with Compass and Coffeescript."
compassPid = Process.spawn("compass watch --sass-dir #{sass_dir} --css-dir #{css_dir}")
coffeePid = Process.spawn("coffee -o #{js_dir}/ -cw #{coffeescript_dir}/")
trap("INT") {
[compassPid, coffeePid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
exit 0
}

[compassPid, coffeePid].each { |pid| Process.wait(pid) }
end



desc "Create zip of latest code."
task :zip, :version do |t, args|

if args.version.nil?
puts "You need to specify a version number."
puts "Example: rake zip[2.5]"
puts "Will create lightboxv2.5.zip"
else
puts "Zip-a-dee-doo-dah"

puts "Version: #{args.version}"
system "rm -rf lightbox"
system "mkdir lightbox"
system "cp index.html lightbox"
system "cp README.markdown lightbox"
system "cp -r css lightbox"
system "cp -r js lightbox"
system "cp -r images lightbox"
system "zip -r lightbox#{args.version}.zip lightbox"
system "mv lightbox#{args.version}.zip releases"
system "rm -rf lightbox"

puts "My, oh my what a wonderful day!"
end
end


desc "Pushes code to production."
task :deploy do
puts "Rsyncing files to production server."
exclude = ""
if File.exists?('./rsync-exclude')
exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
end
puts "## Deploying website via Rsync"
ok_failed system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{"--delete" unless rsync_delete == false} . #{ssh_user}:#{document_root}")
end

def ok_failed(condition)
if (condition)
puts "OK"
else
puts "FAILED"
end
end

Loading…
Cancel
Save