File Coverage

blib/lib/LCFG/Build/Tool/MinorVersion.pm
Criterion Covered Total %
statement 7 9 77.7
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 12 83.3


line stmt bran cond sub pod time code
1             package LCFG::Build::Tool::MinorVersion; # -*-cperl-*-
2 1     1   1716 use strict;
  1         2  
  1         29  
3 1     1   4 use warnings;
  1         2  
  1         37  
4              
5             # $Id: MinorVersion.pm.in 5770 2010-01-18 18:08:16Z squinney@INF.ED.AC.UK $
6             # $Source: /var/cvs/dice/LCFG-Build-Tools/lib/LCFG/Build/Tool/MinorVersion.pm.in,v $
7             # $Revision: 5770 $
8             # $HeadURL: https://svn.lcfg.org/svn/source/tags/LCFG-Build-Tools/LCFG_Build_Tools_0_4_0/lib/LCFG/Build/Tool/MinorVersion.pm.in $
9             # $Date: 2010-01-18 18:08:16 +0000 (Mon, 18 Jan 2010) $
10              
11             our $VERSION = '0.4.0';
12              
13 1     1   492 use Moose;
  0            
  0            
14              
15             extends 'LCFG::Build::Tool::MicroVersion';
16              
17             override 'abstract' => sub {
18             return q{Tag the source tree as a particular minor release};
19             };
20              
21             override 'execute' => sub {
22             my ($self) = @_;
23              
24             return $self->minorversion;
25             };
26              
27             __PACKAGE__->meta->make_immutable;
28              
29             no Moose;
30             1;
31             __END__
32              
33             =head1 NAME
34              
35             LCFG::Build::Tool::MinorVersion - LCFG software packaging tool
36              
37             =head1 VERSION
38              
39             This documentation refers to LCFG::Build::Tool::MinorVersion version 0.4.0
40              
41             =head1 SYNOPSIS
42              
43             my $tool = LCFG::Build::Tool::MinorVersion->new( dir => '.' );
44              
45             $tool->execute;
46              
47             my $tool2 = LCFG::Build::Tool::MinorVersion->new_with_options();
48              
49             $tool2->execute;
50              
51             =head1 DESCRIPTION
52              
53             This module provides software release tools for the LCFG build
54             suite.
55              
56             This tool will increment the middle part of the project version
57             field and then tag a release of the project in the package
58             version-control repository.
59              
60             It is possible to check that all changes to files have been committed
61             prior to doing a new release. Prior to actually doing the tagging it
62             is also possible to generate the project log file from the
63             version-control system logs.
64              
65             More information on the LCFG build tools is available from the website
66             http://www.lcfg.org/doc/buildtools/
67              
68             =head1 ATTRIBUTES
69              
70             The following attributes are modifiable via the command-line (i.e. via
71             @ARGV) as well as the normal way when the Tool object is
72             created. Unless stated the options take strings as arguments and can
73             be used like C<--foo=bar>. Boolean options can be expressed as either
74             C<--foo> or C<--no-foo> to signify true and false values.
75              
76             =over 4
77              
78             =item dryrun
79              
80             A boolean value which indicates whether actions which permanently
81             alter the contents of files should be carried out. The default value
82             is false (0). When running in dry-run mode various you will typically
83             get extra output to the screen showing what would have been done.
84              
85             =item quiet
86              
87             A boolean value which indicates whether the actions should attempt to
88             be quieter. The default value is false (0).
89              
90             =item dir
91              
92             The path of the project directory which contains the software for
93             which you want to create a release. If this is not specified then a
94             default value of the current directory (.) will be used. This
95             directory must already contain the LCFG build metadata file (lcfg.yml)
96             for the software.
97              
98             =item logname
99              
100             The name of the changelog file for this software project (e.g. Changes
101             or ChangeLog). By default the value specified in the LCFG metadata
102             file will be used.
103              
104             =item checkcommitted
105              
106             This is a boolean value which signifies whether the software project
107             should be checked for uncommitted files before a new release is
108             made. By default the value specified in the LCFG metadata file will be
109             used.
110              
111             =item genchangelog
112              
113             This is a boolean value which signifies whether the changelog file for
114             the software project should be generated from the commit logs of the
115             version-control system. By default the value specified in the LCFG
116             metadata file will be used.
117              
118             =back
119              
120             The following methods are not modifiable by the command-line, they are
121             however directly modifiable via the Tool object if
122             necessary. Typically you will only need to query these attributes,
123             they are automatically created when you need them using values for
124             some of the other command-line attributes.
125              
126             =over 4
127              
128             =item spec
129              
130             This is a reference to the current project metadata object, see
131             L<LCFG::Build::PkgSpec> for full details.
132              
133             =item vcs
134              
135             This is a reference to the current version-control object, see
136             L<LCFG::Build::VCS> for full details.
137              
138             =back
139              
140             =head1 SUBROUTINES/METHODS
141              
142             =over 4
143              
144             =item execute
145              
146             This calls the C<minorversion> method of
147             L<LCFG::Build::Tool::MicroVersion>, you should read the documentation in
148             that module for more details of the procedures.
149              
150             =item fail($message)
151              
152             Immediately fails (i.e. dies) and displays the message.
153              
154             =item log($message)
155              
156             Logs the message to the screen if the C<quiet> attribute has not been
157             specified. A message string is prefixed with 'LCFG: ' to help visually
158             separate it from other output.
159              
160             =back
161              
162             =head1 DEPENDENCIES
163              
164             This module is L<Moose> powered and uses L<MooseX::App::Cmd> to handle
165             command-line options.
166              
167             The following modules from the LCFG build tools suite are also
168             required: L<LCFG::Build::Tool::MicroVersion>, L<LCFG::Build::PkgSpec>,
169             L<LCFG::Build::VCS> and VCS helper module for your preferred
170             version-control system.
171              
172             =head1 SEE ALSO
173              
174             L<LCFG::Build::Tools>, L<LCFG::Build::Skeleton>, lcfg-reltool(1)
175              
176             =head1 PLATFORMS
177              
178             This is the list of platforms on which we have tested this
179             software. We expect this software to work on any Unix-like platform
180             which is supported by Perl.
181              
182             Fedora12, Fedora13, ScientificLinux5, ScientificLinux6, MacOSX7
183              
184             =head1 BUGS AND LIMITATIONS
185              
186             There are no known bugs in this application. Please report any
187             problems to bugs@lcfg.org, feedback and patches are also always very
188             welcome.
189              
190             =head1 AUTHOR
191              
192             Stephen Quinney <squinney@inf.ed.ac.uk>
193              
194             =head1 LICENSE AND COPYRIGHT
195              
196             Copyright (C) 2008 University of Edinburgh. All rights reserved.
197              
198             This library is free software; you can redistribute it and/or modify
199             it under the terms of the GPL, version 2 or later.
200              
201             =cut