Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jonasbn (1153)

jonasbn
  reversethis-{gro.napc} {ta} {nbsanoj}
http://usr.bin.dk/~jonasbn/
AOL IM: BJonasN (Add Buddy, Send Message)

Freelance Perl Programmer located in Copenhagen, Denmark. Active member of Copenhagen Perl Mongers.

Author of:

  • Business::DK::CPR
  • Business::DK::CVR
  • Business::DK::PO
  • Business::OnlinePayment::CashCow
  • Date::Holidays
  • Date::Holidays::Abstract
  • Date::Holidays::Super
  • Date::Pregnancy
  • Games::Bingo
  • Games::Bingo::Bot
  • Games::Bingo::Print
  • Module::Info::File
  • Module::Template::Setup
  • Test::Timer
and maintainer of:
  • Tie::Tools
  • XML::Conf
  • Workflow

Journal of jonasbn (1153)

Friday July 18, 2008
03:01 PM

Module::Build and gzip

[ #36955 ]

I sometimes go into a loop where my workflow contains pushing a distribution several times to application host. I prefer working in the editors on my local machine and not in vi/vim on the application hosts (and then I have to pull back stuff to stick it in CVS).

This takes quite a few commands since I have to push it via a jump host via SSH. So I attempt to make the commands I have in my history as one-linerish as possible so I do not have to skip through several steps.

I have been cursing at Module::Build's ./Build dist, since it kept prompting me to decide whether I wanted to overwrite the existing tar-ball with the same name, being the product of the command.

gzip even has a force flag!

Today I went back and had a look at the docs and I fell over the --gzip option.

So now my command looks like this:

% ./Build dist --gzip='/usr/bin/gzip --force'; scp somedistribution-1.00.tar.gz jonasbn@jumphost:~/

I a do not have to answer yes everytime I want to deploy a new distribution.

Next step would be to make the jump host transparent so stuff would go to the designated application server on the other site, I am sure this can be done,propably involving some serious tunneling - I just not had the time to figure out how and we do have quite a few application servers, so I have to figure out some nifty approach.

Hints are welcome...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Write your own "Build deploy" action?

    # Build.PL
    use strict;
    use Module::Build;

    my $class = Module::Build->subclass(
        class => "Module::Build::jonasbn",
        code => <<'SUBCLASS', );

        sub ACTION_deploy {
            my $self = shift;
            $self->depends_on('dist'); # create tarball
            # add code here to scp
        }

    SUBCLASS

    $class->new( %normal_mb_args )->create_build_script;

    • I have done several subclasses of Module::Build and I actually already have one for this client, so I could just extend it.

      Thanks for the feedback,

      jonasbn