Permalink
Browse files

initial checkin of Fuse IDE

  • Loading branch information...
jstrachan committed Oct 16, 2012
0 parents commit f3082cbf82339860c33add858ea1662e4b1e81e1
Showing 2,943 changed files with 232,553 additions and 0 deletions.
@@ -0,0 +1,14 @@
+target
+*.iml
+*.ipr
+*.iws
+overlays
+.DS_Store
+.settings
+bin
+runtime-EclipseApplication-m2eclipse
+.metadata
+/runtime-*/
+./fabric
+./fuseenterprise
+.idea
@@ -0,0 +1,72 @@
+#!/usr/bin/env ruby
+
+require 'rexml/document'
+include REXML
+
+require 'fileutils'
+include FileUtils
+
+
+if ARGV.size < 1
+ puts "Usage: addUpdateSiteVersion versionNumber [directory] [test]"
+ puts "Use 'ide' to update production otherwise we default to 'beta/ide'"
+ puts "specifying 'test' does not actually perform the upload"
+ exit 0
+end
+
+def add_version(file_name, version, clear = true)
+ file = File.new(file_name)
+ doc = Document.new(file)
+ children = doc.root.elements["children"]
+ if children.to_s.include?(version)
+ puts "File #{file_name} already contains version #{version}"
+ exit 0
+ end
+
+ # always clear!
+ if clear
+ children.elements.delete_all("*")
+ end
+ children.add_text(" ")
+ ne = children.add_element("child").add_attribute("location", version)
+ children.add_text("\n")
+
+ formatter = REXML::Formatters::Pretty.new()
+ io = File.open(file_name, "w")
+ formatter.write(doc, io)
+ io.close
+
+ puts("Added version #{version} to #{file_name}")
+end
+
+version = ARGV[0]
+path = "beta/ide"
+if ARGV.size > 1
+ path = ARGV[1]
+end
+test = false
+if ARGV.size > 2
+ test = true
+end
+
+location = "repo.fusesource.com:/www/repo.fusesource.com/" + path
+
+puts "Adding version #{version} to Eclipse Update XML files at #{location}"
+
+tmpDir = "target"
+mkdir_p(tmpDir)
+
+system("scp #{location}/*.xml #{tmpDir}")
+
+add_version("#{tmpDir}/compositeArtifacts.xml", version)
+add_version("#{tmpDir}/compositeContent.xml", version)
+
+if not test
+ puts "Copying modified files to repo..."
+
+ system("scp #{tmpDir}/*.xml #{location}")
+end
+
+
+
+
Oops, something went wrong.

0 comments on commit f3082cb

Please sign in to comment.