Changeset 666
- Timestamp:
- 08/10/06 17:41:23 (2 years ago)
- Files:
-
- branches/mt3.32/build/exportmt.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mt3.32/build/exportmt.pl
r665 r666 28 28 my %o = get_options( 29 29 'agent=s' => '', # Constructed at run-time. 30 'alpha=s' => 0, # Alpha build number. 30 31 'arch=s' => [qw( .tar.gz .zip )], 32 'beta=s' => 0, # Beta build number. 31 33 'cleanup!' => 1, # Remove the exported directory after deployment. 34 'date!' => 1, # Toggle date stamping. 32 35 'debug' => 0, # Turn on/off the actual system calls. 33 36 'deploy:s' => '', #($ENV{USER}||$ENV{USERNAME}).'@rongo:/usr/local/cifs/intranet/mt-interest/', … … 55 58 'repo=s' => 'trunk', # Reset at runtime depending on branch,tag. 56 59 'repo-uri=s' => '', #'https://intranet.sixapart.com/repos/eng', 60 'rev!' => 1, # Toggle revision stamping. 57 61 'stage' => 0, # Command-line --option alias 58 62 'stage-dir=s' => '/var/www/html/mt-stage', … … 76 80 set_repo(); 77 81 78 # Production builds are not dated or stamped (or symlinked if staged).79 if( $o{'prod'} ) {82 # Handle option aliases. 83 if( $o{'prod'} or $o{'alpha=s'} or $o{'beta=s'} ) { 80 84 $o{'symlink!'} = 0; 81 85 } 82 # Local builds don't deploy or cleanup after themselves.83 86 if( $o{'local'} ) { 84 87 $o{'cleanup!'} = 0; 85 88 } 86 # Staging deploys into the stage-dir.87 89 if( $o{'stage'} ) { 88 90 $o{'deploy:s'} = $o{'stage-dir=s'}; … … 97 99 my $config = read_conf( "build/mt-dists/$o{'pack=s'}.mk" ); 98 100 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 : '' ); 100 105 push @stamp, $o{'short-lang=s'}; 101 106 # Add repo, date and ldap to the stamp if we are not production. 102 107 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!'}; 106 115 push @stamp, 'ldap' if $o{'ldap'}; 107 116 } … … 632 641 cd \$MT_DIR 633 642 svn up 643 perl $0 --alpha=1 644 perl $0 --beta=42 634 645 perl $0 --debug 635 646 perl $0 --help
