root/branches/release-29/build/exportmt.pl @ 1350

Revision 1350, 1.9 kB (checked in by fumiakiy, 22 months ago)

Merging the latest of Release-28 to 29. svn merge -r1307:1332 http://code.sixapart.com/svn/movabletype/branches/release-28 .

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Id
Line 
1#!/usr/bin/perl
2
3# Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd.
4# This program is distributed under the terms of the
5# GNU General Public License, version 2.
6#
7# $Id$
8
9use strict;
10use warnings;
11use lib 'build';
12use Build;
13use Data::Dumper;
14$Data::Dumper::Indent = $Data::Dumper::Terse = $Data::Dumper::Sortkeys = 1;
15
16my $build = Build->new();
17
18$build->usage() unless @ARGV;
19
20# Get the command-line options.
21$build->get_options();
22
23# Show the usage if requested.
24$build->usage() if $build->help();
25
26foreach my $lang ( $build->languages() ) {
27    local $build->{'stamp=s'};
28    local $ENV{BUILD_VERSION_ID};
29    $build->setup( language => $lang );
30
31    # Summarize what we are about to do.
32    $build->verbose( sprintf '* Debug mode is %s and system calls %s be made.',
33        $build->debug() ? 'ON' : 'OFF', $build->debug() ? "WON'T" : 'WILL' );
34    $build->verbose( sprintf 'Run options: %s', Dumper $build ) if $build->debug();
35
36    # Get any existing distro with the same path name, out of the way.
37    $build->remove_copy();
38
39    # Export the latest files.
40    $build->export();
41
42    # Export any plugins that are requested.
43    $build->plugin_export();
44
45    # Export any addons that are requested.
46    ## $build->addons_export();
47
48    # Add a non-production footer.
49    $build->inject_footer();
50
51    # Actually build the distribution files.
52    $build->make();
53
54    # Create lists of the distribution paths and uris.
55    my $distros = $build->create_distro_list();
56
57    # Deploy the distributions.
58    $build->deploy_distros( $distros );
59
60    # Cleanup the exported files.
61    $build->cleanup();
62
63    # TODO Factor out the (rarely used) email notification.
64    $build->notify( $distros );
65}
66
67__END__
68
69=head1 NAME
70
71exportmt - Movable Type Export Build Deployment and Notification
72
73=head1 SEE ALSO
74
75https://intranet.sixapart.com/wiki/index.php/Movable_Type:MT_Export-Deploy
76
77The L<Build> (F<build/Build.pm>) module.
78
79=cut
Note: See TracBrowser for help on using the browser.