App-Dest
view release on metacpan or search on metacpan
1.20 2018-09-05 16:28:32-07:00 America/Los_Angeles
- The real fix this time for status reporting of differences actions
1.19 2018-09-05 15:50:09-07:00 America/Los_Angeles
- Fix status reporting of differences actions (display only)
1.18 2018-06-20 16:31:42-07:00 America/Los_Angeles
- Adding Perl versions to test; annual general update for 2018
- Support for: "dest clean SPECIFIC_ACTION"
- Sort results from: "dest list"
- Add "expand" and expand what "list" can do with a filter
1.17 2017-09-08 11:23:52-07:00 America/Los_Angeles
- Minor status display fix for actions with file suffixes
- Tiny test warning cleanup
1.16 2017-03-04 09:19:28-08:00 America/Los_Angeles
- POD improvements and extentions
- Add test coverage for writewatch
1.15 2017-02-24 12:44:17-08:00 America/Los_Angeles
# PODNAME: dest
# ABSTRACT: Deployment State Manager
our $VERSION = '1.36'; # VERSION
use Pod::Usage 'pod2usage';
use App::Dest;
my @commands = qw(
init add rm
watches putwatch writewatch
make expand list prereqs
status diff clean preinstall nuke
deploy redeploy revdeploy verify revert update
man version
);
my ( $command, @args ) = @ARGV;
( $command = lc( $command || 'undef' ) ) =~ s/^\-+//;
my @command = grep { index( $_, $command ) == 0 } @commands;
($command) = @command;
lib/App/Dest.pm view on Meta::CPAN
mkpath($path);
for ( qw( deploy verify revert ) ) {
open( my $file, '>', "$path/$_$ext" ) or die;
print $file "\n";
}
}
catch ($e) {
die "Failed to fully make $path; check permissions or existing files\n";
}
$self->expand($path);
return 0;
}
sub expand {
my ( $self, $path ) = @_;
print join( ' ', map { <"$path/$_*"> } qw( deploy verify revert ) ), "\n";
return 0;
}
sub list {
my $self = _new(shift);
my ($filter) = @_;
lib/App/Dest.pm view on Meta::CPAN
dest init # initialize dest for a project
dest add DIR # add a directory to dest tracking list
dest rm DIR # remove a directory from dest tracking list
dest watches # returns a list of watched directories
dest putwatch FILE # set watch list to be what's in a file
dest writewatch # creates watch file in project root directory
dest make NAME [EXT] # create a named template set (set of 3 files)
dest expand NAME # dump a list of the template set (set of 3 files)
dest list [FILTER] # list all actions in all watches
dest prereqs [FILTER] # like "list" but include report of prereqs
dest status # check status of tracked directories
dest diff [NAME] # display a diff of any modified actions
dest clean [NAME] # reset dest state to match current files/dirs
dest preinstall [NAME] # set dest state so an update will deploy everything
dest nuke # de-initialize dest; remove all dest stuff
dest deploy NAME [-d] # deployment of a specific action
lib/App/Dest.pm view on Meta::CPAN
# this will create and open in vi:
# db/schema/deploy.sql
# db/schema/revert.sql
# db/schema/verify.sql
And optionally, you can include any date/time format supported by L<POSIX>
C<strftime>.
dest make db/%s_action sql
=head2 expand NAME
This command lists out the relative paths and names of the 3 files of the
action provided, so you can do stuff like:
vi `dest expand db/schema`
=head2 list [FILTER]
This command will list all tracked directories and every action within each
directory. If provided a filter, it will limit what's displayed to actions
containing the filter.
=head2 prereqs [FILTER]
This command will list every action within any tracked directory, then for each
( run in 0.575 second using v1.01-cache-2.11-cpan-97f6503c9c8 )