bug 409395: factor out Bootstrap's 'useTarGz' logic to a helper function

This commit is contained in:
bhearsum@mozilla.com 2007-12-28 06:36:18 -08:00
parent 0c193f8134
commit bac1025e3f
4 changed files with 19 additions and 20 deletions

View File

@ -165,6 +165,17 @@ sub GetFtpCandidateDir {
return $candidateDir;
}
sub GetLinuxExtension {
my $this = shift;
# We are assuming tar.bz2 to help minimize bootstrap.cfg variables in
# the future. tar.gz support can probably be removed once we stop
# building/releasing products that use it.
my $useTarGz = $this->Exists(var => 'useTarGz') ?
$this->Get(var => 'useTarGz') : 0;
return ($useTarGz) ? 'gz' : 'bz2';
}
##
# Exists checks to see if a config variable exists.
# Returns boolean (1 or 0)

View File

@ -72,11 +72,9 @@ sub Verify {
my $mozillaCvsroot = $config->Get(var => 'mozillaCvsroot');
my $verifyDir = $config->Get(var => 'verifyDir');
my $stagingServer = $config->Get(var => 'stagingServer');
my $useTarGz = $config->Exists(var => 'useTarGz') ?
$config->Get(var => 'useTarGz') : 0;
my $linuxExtension = $config->GetLinuxExtension();
my $rcTag = $productTag.'_RC'.$rc;
my $linuxExtension = ($useTarGz) ? '.gz' : '.bz2';
# l10n metadiff test
my $verifyDirVersion = catfile($verifyDir, $product . '-' . $version);
@ -103,7 +101,7 @@ sub Verify {
'-e', 'ssh',
'--include=*.dmg',
'--include=*.exe',
'--include=*.tar'.$linuxExtension,
'--include=*.tar.'.$linuxExtension,
'--exclude=*',
$stagingServer . ':/home/ftp/pub/' . $product
. '/nightly/' . $version . '-candidates/rc' . $rc . '/*',
@ -122,7 +120,7 @@ sub Verify {
'-e', 'ssh',
'--include=*.dmg',
'--include=*.exe',
'--include=*.tar'.$linuxExtension,
'--include=*.tar.'.$linuxExtension,
'--exclude=*',
$stagingServer . ':/home/ftp/pub/' . $product
. '/nightly/' . $oldVersion . '-candidates/rc'

View File

@ -435,9 +435,7 @@ sub Verify {
my $stageHome = $config->Get(var => 'stageHome');
my $productTag = $config->Get(var => 'productTag');
my $mozillaCvsroot = $config->Get(var => 'mozillaCvsroot');
my $useTarGz = $config->Exists(var => 'useTarGz') ?
$config->Get(var => 'useTarGz') : 0;
my $linuxExtension = ($useTarGz) ? 'gz' : 'bz2';
my $linuxExtension = $config->GetLinuxExtension();
## Prepare the staging directory for the release.
# Create the staging directory.
@ -624,9 +622,7 @@ sub IsValidLocaleDeliverable {
my $config = new Bootstrap::Config();
my $useTarGz = $config->Exists(var => 'useTarGz') ?
$config->Get(var => 'useTarGz') : 0;
my $linuxExtension = ($useTarGz) ? 'gz' : 'bz2';
my $linuxExtension = $config->GetLinuxExtension();
my $dirent = $File::Find::name;

View File

@ -232,13 +232,7 @@ sub BumpVerifyConfig {
my $externalStagingServer = $config->Get(var => 'externalStagingServer');
my $verifyConfig = $config->Get(sysvar => 'verifyConfig');
my $logDir = $config->Get(sysvar => 'logDir');
# We are assuming tar.bz2 to help minimize bootstrap.cfg variables in
# the future. tar.gz support can probably be removed once we stop
# building/releasing products that use it.
my $useTarGz = $config->Exists(var => 'useTarGz') ?
$config->Get(var => 'useTarGz') : 0;
my $linuxExtension = ($useTarGz) ? '.gz' : '.bz2';
my $linuxExtension = $config->GetLinuxExtension();
my $verifyDirVersion = catfile($verifyDir, $product . '-' . $version);
my $configFile = catfile($verifyDirVersion, 'updates', $verifyConfig);
@ -260,8 +254,8 @@ sub BumpVerifyConfig {
$buildTarget = 'Linux_x86-gcc3';
$platform = 'linux';
$ftpOsname = 'linux-i686';
$releaseFile = $product.'-'.$oldVersion.'.tar'.$linuxExtension;
$nightlyFile = $product.'-'.$version.'.%locale%.linux-i686.tar'.
$releaseFile = $product.'-'.$oldVersion.'.tar.'.$linuxExtension;
$nightlyFile = $product.'-'.$version.'.%locale%.linux-i686.tar.'.
$linuxExtension;
} elsif ($osname eq 'macosx') {
$buildTarget = 'Darwin_Universal-gcc3';