Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add deployment script

  • Loading branch information...
commit 9743dada44fbcbc5dc0622f524ad75323015e282 1 parent dd1f8f4
Tom Dale authored
Showing with 36 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +35 −0 deploy.rb
View
1  .gitignore
@@ -1,2 +1,3 @@
.strobe
.DS_Store
+output/
View
35 deploy.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.