common/tools/generate_diamonds_tags_xml.pl
author Simon Howkins <simonh@symbian.org>
Thu, 10 Dec 2009 12:01:59 +0000
changeset 825 1de547e13d13
parent 693 9f583ada8e4e
permissions -rw-r--r--
Updates to make the build environment check more reasonable: Mercurial v1.3 permitted The Java compiler is not a showstopping issue 7-zip can be installed in any location Update to Helium 5 Helium can be installed in PDT 1.*, not necessarily 1.0 Raptor installation path not significant Update to Raptor 2.9.* The Raptor patch to update the bundled version of python is no longer relevant BRAG calculations updated to ignore items not being in the system path, as this just doesn't matter. Overall effect is that the build environment check should pass on a machine that is able to do a build!

#! perl -w
# Copyright (c) 2009 Symbian Foundation Ltd
# This component and the accompanying materials are made available
# under the terms of the License "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Symbian Foundation Ltd - initial contribution.
# 
# Contributors:
#
# Description:
# Generate an XML file in the Diamonds format to upload build tags to Diamonds

use strict;

use Getopt::Long;

my $taglist = 0;
my $outputfile = 0;
my $help = 0;
GetOptions((
	'tags:s' => \$taglist,
	'output:s' => \$outputfile,
	'help!' => \$help,
));

if ($help or !$outputfile)
{
	print "Usage: perl generate_diamonds_tags_xml.pl --tags COMMA_SEPARATED_TAG_LIST --output OUTPUT_FILE\n";
	exit(0);
}

open(FILE, ">$outputfile");

print FILE <<_END_HEADER;
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<diamonds-build>
  <schema>13</schema>
  <tags>
_END_HEADER

my @tags = split(/,/, $taglist);
for (@tags)
{
	print FILE "    <tag>$_</tag>\n";
}

print FILE <<_END_TRAILER;  
  </tags>
</diamonds-build>
_END_TRAILER

close(FILE);