Permalink
Browse files

Add deployment script

  • Loading branch information...
1 parent dd1f8f4 commit 9743dada44fbcbc5dc0622f524ad75323015e282 Tom Dale committed May 30, 2011
Showing with 36 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +35 −0 deploy.rb
View
@@ -1,2 +1,3 @@
.strobe
.DS_Store
+output/
View
@@ -0,0 +1,35 @@
+require 'fileutils'
+include FileUtils
+
+rm_rf "output"
+mkdir_p "output"
+
+puts pwd
+
+Dir['*'].each do |item|
+ puts "Copying #{item}"
+ cp_r(item, "output") unless item == "output"
+end
+
+uglified = nil
+IO.popen("uglifyjs output/js/app.js", "r") do |io|
+ uglified = io.read
+end
+
+rm "output/js/app.js"
+
+File.open("output/js/app.js", "w") do |file|
+ file.write uglified
+end
+
+mkdir_p "output/.strobe"
+File.open("output/.strobe/config", "w") do |file|
+ file.write <<eos
+---
+STROBE_APPLICATION_ID: 243
+eos
+end
+
+cd "output" do
+ `strobe deploy --yes`
+end

0 comments on commit 9743dad

Please sign in to comment.