Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f3082cb
Showing
2,943 changed files
with
232,553 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
target | ||
*.iml | ||
*.ipr | ||
*.iws | ||
overlays | ||
.DS_Store | ||
.settings | ||
bin | ||
runtime-EclipseApplication-m2eclipse | ||
.metadata | ||
/runtime-*/ | ||
./fabric | ||
./fuseenterprise | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.