Skip to content

Instantly share code, notes, and snippets.

@jdlich
Created January 11, 2012 16:37
Show Gist options
  • Save jdlich/1595521 to your computer and use it in GitHub Desktop.
Save jdlich/1595521 to your computer and use it in GitHub Desktop.
skin = "#{SAKAI}/reference/library/src/webapp/skin/#{SKIN}"
TOMCAT = "apache-tomcat-5.5.20"
SAKAI = "sakai-2.7.1"
SKIN = "wake-forest"
namespace :open do
desc "Open skin in Textmate"
task :skin do
system "mate #{skin}"
end
end
def rsync src, dst
system "rsync -ruv --exclude '*svn' --exclude 'scss' --exclude '.sass*' #{src} #{dst}"
end
task :copy do
src = "#{SAKAI}/site-manage/site-manage-tool/tool/src/webapp/js/"
dst = "#{TOMCAT}/webapps/sakai-site-manage-tool/js/"
rsync src, dst
end
desc "Publish skin to Tomcat"
task :publish do
rsync skin, "#{TOMCAT}/webapps/library/skin/"
end
desc "Redeploy Sakai"
task :build => [:clean_tomcat, :mvn_install]
task :clean_tomcat do
system "rm -rf #{TOMCAT}/webapps/*"
sleep 1
end
task :mvn_install do
Dir.chdir(SAKAI) do
system "mvn clean install -Dmaven.test.skip=true sakai:deploy -Dmaven.tomcat.home=/Users/Jacob/Sites/sakai.wfu.edu/apache-tomcat-5.5.20"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment