Permalink
Browse files

Finish the build scripts.

  • Loading branch information...
1 parent 5d33d94 commit 079a859637fcefadab64c16ea5a61ca66783d4d9 @slembcke committed Jan 13, 2015
Showing with 27 additions and 50 deletions.
  1. +0 −50 scripts/BuildReleaseArchive.rb
  2. +27 −0 scripts/UploadArchive.rb
@@ -20,8 +20,6 @@ def system(command)
system "'#{DOXYGEN_PATH}' Doxyfile"
}
-exit
-
Dir.chdir(CHIPMUNK_TMP_PATH){
system "(cd doc-src && ruby MakeDocs.rb)"
@@ -43,51 +41,3 @@ def system(command)
}
system "tar -czf '#{CHIPMUNK_TMP_PATH}.tgz' -C '#{File.dirname(CHIPMUNK_TMP_PATH)}' '#{File.basename(CHIPMUNK_TMP_PATH)}'"
-
-## Build Chipmunk Pro variants
-#CHIPMUNK_PRO_TMP_PATH = "/tmp/ChipmunkPro-TMP"
-#
-#system "rm -rf #{CHIPMUNK_PRO_TMP_PATH}"
-#system "git archive --prefix=ChipmunkPro-TMP/ HEAD | tar -xC /tmp"
-#
-#def build_variant(name, white_list)
-# variant_path = "/tmp/#{name}"
-# system "mkdir #{variant_path}"
-#
-# Dir.glob("*"){|filename| system "cp -r #{filename} #{variant_path}" if white_list.include?(filename)}
-#
-# system "tar -czf #{variant_path}.tgz -C #{File.dirname(variant_path)} #{File.basename(variant_path)}"
-#
-# return variant_path
-#end
-#
-#Dir.chdir(CHIPMUNK_PRO_TMP_PATH){
-# system "cp -r #{CHIPMUNK_TMP_PATH}/ Chipmunk/"
-#
-# system "cd Chipmunk && ruby doxygen_generator.rb"
-# system "#{DOXYGEN_PATH} Doxyfile"
-# system "./iphonestatic.command"
-#
-# build_variant("ChipmunkPro-#{VERS}", [
-# "API-Reference",
-# "AutoGeometry",
-# "BenchmarkApp",
-# "Chipmunk",
-# "ChipmunkPro-iPhone",
-# "ChipmunkPro.xcodeproj",
-# "Experimental",
-# "HastySpace",
-# "iphonestatic.command",
-# "macstatic.command",
-# "Objective-Chipmunk",
-# "README.html",
-# "UnitTests",
-# ])
-#
-# build_variant("ChipmunkPro-Trial-#{VERS}", [
-# "API-Reference",
-# "Chipmunk",
-# "ChipmunkPro-iPhone-Trial",
-# "README.html",
-# ])
-#}
@@ -0,0 +1,27 @@
+VERS = ARGV[0]
+raise("No version number!") unless VERS
+
+def system(command)
+ puts command
+ Kernel.system(command)
+end
+
+SSH_CONNECT = "|ssh chipmunk-physics.net 'cd 'chipmunk-physics.net/release'; sh'"
+
+def system_remote(command)
+ puts "#{SSH_CONNECT} > #{command}"
+ open(SSH_CONNECT, 'w+'){|ssh| ssh.puts command}
+end
+
+system("rsync '/tmp/Chipmunk-#{VERS}.tgz' 'chipmunk-physics.net:chipmunk-physics.net/release/Chipmunk-7.x/'")
+
+DOC = "Chipmunk-7.x/Chipmunk-#{VERS}-Docs"
+
+system("rsync -r '/tmp/Chipmunk-#{VERS}/doc/' 'chipmunk-physics.net:chipmunk-physics.net/release/#{DOC}'")
+system_remote("rm 'ChipmunkLatest.tgz'; ln -s 'Chipmunk-7.x/Chipmunk-#{VERS}.tgz' 'ChipmunkLatest.tgz'")
+
+DOC_LINK = "ChipmunkLatest-Docs"
+REF_LINK = "ChipmunkLatest-API-Reference"
+
+system_remote("rm '#{DOC_LINK}'; ln -s '#{DOC}' '#{DOC_LINK}'")
+system_remote("rm '#{REF_LINK}'; ln -s '#{DOC}/API-Reference' '#{REF_LINK}'")

0 comments on commit 079a859

Please sign in to comment.