Changeset 666

Show
Ignore:
Timestamp:
08/10/06 17:41:23 (2 years ago)
Author:
gboggs
Message:

- Re-added --alpha, --beta and --nodate options.
- Added the alpha and beta options to the "no symlink" condition.
- Added the logic to actually update the stamp for alpha and beta.
- Added --norev to supress repository-revision stamping.
- Updated usage to reflect these additions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mt3.32/build/exportmt.pl

    r665 r666  
    2828my %o = get_options( 
    2929  'agent=s'         => '',  # Constructed at run-time. 
     30  'alpha=s'         => 0,  # Alpha build number. 
    3031  'arch=s'          => [qw( .tar.gz .zip )], 
     32  'beta=s'          => 0,  # Beta build number. 
    3133  'cleanup!'        => 1,  # Remove the exported directory after deployment. 
     34  'date!'           => 1,  # Toggle date stamping. 
    3235  'debug'           => 0,  # Turn on/off the actual system calls. 
    3336  'deploy:s'        => '', #($ENV{USER}||$ENV{USERNAME}).'@rongo:/usr/local/cifs/intranet/mt-interest/', 
     
    5558  'repo=s'          => 'trunk',  # Reset at runtime depending on branch,tag. 
    5659  'repo-uri=s'      => '',  #'https://intranet.sixapart.com/repos/eng', 
     60  'rev!'            => 1,  # Toggle revision stamping. 
    5761  'stage'           => 0,  # Command-line --option alias 
    5862  'stage-dir=s'     => '/var/www/html/mt-stage', 
     
    7680set_repo(); 
    7781 
    78 # Production builds are not dated or stamped (or symlinked if staged)
    79 if( $o{'prod'} ) { 
     82# Handle option aliases
     83if( $o{'prod'} or $o{'alpha=s'} or $o{'beta=s'} ) { 
    8084    $o{'symlink!'} = 0; 
    8185} 
    82 # Local builds don't deploy or cleanup after themselves. 
    8386if( $o{'local'} ) { 
    8487    $o{'cleanup!'} = 0; 
    8588} 
    86 # Staging deploys into the stage-dir. 
    8789if( $o{'stage'} ) { 
    8890    $o{'deploy:s'} = $o{'stage-dir=s'}; 
     
    9799    my $config = read_conf( "build/mt-dists/$o{'pack=s'}.mk" ); 
    98100    my @stamp = (); 
    99     push @stamp, $config->{PRODUCT_VERSION}; 
     101    push @stamp, $config->{PRODUCT_VERSION} . ( 
     102        $o{'alpha=s'} ? "a$o{'alpha=s'}" 
     103      : $o{'beta=s'} ? "b$o{'beta=s'}" 
     104      : '' ); 
    100105    push @stamp, $o{'short-lang=s'}; 
    101106    # Add repo, date and ldap to the stamp if we are not production. 
    102107    unless( $o{'prod'} ) { 
    103         push @stamp, lc( fileparse $o{'repo=s'} ); 
    104         push @stamp, $revision; 
    105         push @stamp, sprintf( '%04d%02d%02d', (localtime)[5]+1900, (localtime)[4]+1, (localtime)[3]); 
     108        if( $o{'rev!'} ) { 
     109            push @stamp, lc( fileparse $o{'repo=s'} ); 
     110            push @stamp, $revision; 
     111        } 
     112        push @stamp, sprintf( 
     113            '%04d%02d%02d', (localtime)[5]+1900, (localtime)[4]+1, (localtime)[3] 
     114        ) if $o{'date!'}; 
    106115        push @stamp, 'ldap' if $o{'ldap'}; 
    107116    } 
     
    632641 cd \$MT_DIR 
    633642 svn up 
     643 perl $0 --alpha=1 
     644 perl $0 --beta=42 
    634645 perl $0 --debug 
    635646 perl $0 --help