Skip to content

Commit

Permalink
initial checkin of Fuse IDE
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrachan committed Oct 16, 2012
0 parents commit f3082cb
Show file tree
Hide file tree
Showing 2,943 changed files with 232,553 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
@@ -0,0 +1,14 @@
target
*.iml
*.ipr
*.iws
overlays
.DS_Store
.settings
bin
runtime-EclipseApplication-m2eclipse
.metadata
/runtime-*/
./fabric
./fuseenterprise
.idea
72 changes: 72 additions & 0 deletions addUpdateSiteVersion
@@ -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




0 comments on commit f3082cb

Please sign in to comment.