Subversion Repositories DevTools

Rev

Rev 341 | Rev 357 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 341 Rev 353
Line 20... Line 20...
20
#                   -infile     auto.xml/auto.pl
20
#                   -infile     auto.xml/auto.pl
21
#                   -outfile    xxxdepends.xml/build.pl
21
#                   -outfile    xxxdepends.xml/build.pl
22
#                   -pname      package_name
22
#                   -pname      package_name
23
#                   -pversion   package_version
23
#                   -pversion   package_version
24
#                   -infofile   path_to_info_file
24
#                   -infofile   path_to_info_file
25
#                   -wiplabel   Existing WIP label (optional)
25
#                   -wiplabel   Existing WIP label (deprecate)
26
#                   -baselabel  View label
26
#                   -baselabel  View label
-
 
27
#                   -isawip     Is A WIP (optional)
27
#
28
#
28
#......................................................................#
29
#......................................................................#
29
 
30
 
30
use strict;
31
use strict;
31
use warnings;
32
use warnings;
Line 52... Line 53...
52
my $opt_infofile;
53
my $opt_infofile;
53
my $opt_pname;
54
my $opt_pname;
54
my $opt_pversion;
55
my $opt_pversion;
55
my $opt_wiplabel;
56
my $opt_wiplabel;
56
my $opt_baselabel;
57
my $opt_baselabel;
-
 
58
my $opt_isa_wip;
57
 
59
 
58
#
60
#
59
#   Globals
61
#   Globals
60
#
62
#
61
my $root_dir;
63
my $root_dir;
62
my $pkg_label;
-
 
63
my $tag_label;
64
my $tag_label;
64
 
65
 
65
my $ws_root;
66
my $ws_root;
66
my $pkg_root;
67
my $pkg_root;
67
 
68
 
Line 79... Line 80...
79
                "infofile=s"    => \$opt_infofile,          # string
80
                "infofile=s"    => \$opt_infofile,          # string
80
                "pname=s"       => \$opt_pname,             # string
81
                "pname=s"       => \$opt_pname,             # string
81
                "pversion=s"    => \$opt_pversion,          # string
82
                "pversion=s"    => \$opt_pversion,          # string
82
                "wiplabel=s"    => \$opt_wiplabel,          # string
83
                "wiplabel=s"    => \$opt_wiplabel,          # string
83
                "baselabel=s"   => \$opt_baselabel,         # string
84
                "baselabel=s"   => \$opt_baselabel,         # string
-
 
85
                "isawip:+"      => \$opt_isa_wip,           # Flag
84
 
86
 
85
                #
87
                #
86
                #   Update documentation at the end of the file
88
                #   Update documentation at the end of the file
87
                #
89
                #
88
                );
90
                );
Line 185... Line 187...
185
#                       3) Create a new label
187
#                       3) Create a new label
186
#
188
#
187
# Inputs          : Globals
189
# Inputs          : Globals
188
#
190
#
189
# Returns         : Globals
191
# Returns         : Globals
190
#                       $pkg_label
192
#                       $tag_label
191
#
193
#
192
sub determine_package_label
194
sub determine_package_label
193
{
195
{
194
 
196
 
195
    #
197
    #
Line 237... Line 239...
237
    }
239
    }
238
 
240
 
239
    #
241
    #
240
    #   Free label has been found
242
    #   Free label has been found
241
    #
243
    #
242
    unless ( $opt_wiplabel )
-
 
243
    {
-
 
244
        $pkg_label = $tag_label;
-
 
245
    }
-
 
246
    else
-
 
247
    {
-
 
248
        $pkg_label = $opt_wiplabel;
-
 
249
    }
-
 
250
}
244
}
251
 
245
 
252
#-------------------------------------------------------------------------------
246
#-------------------------------------------------------------------------------
253
# Function        : label_build_view
247
# Function        : label_build_view
254
#
248
#
Line 278... Line 272...
278
               'replace'  => 0,
272
               'replace'  => 0,
279
               'comment'  => 'Created by Jats SaveBuild',
273
               'comment'  => 'Created by Jats SaveBuild',
280
               );
274
               );
281
    Message ("Repository Ref: " . $session->RmRef);
275
    Message ("Repository Ref: " . $session->RmRef);
282
 
276
 
283
    if ( $opt_wiplabel )
277
    if ( $opt_isa_wip || $opt_wiplabel )
284
    {
278
    {
285
        #
279
        #
286
        #   If the build is based on a WIP, then we can delete the
280
        #   If the build is based on a WIP, then we can delete the
287
        #   WIP if its based on a branch
281
        #   WIP if its based on a branch
288
        #
282
        #
Line 308... Line 302...
308
    {
302
    {
309
 
303
 
310
        my $data = JatsProperties::New();
304
        my $data = JatsProperties::New();
311
 
305
 
312
        $data->setProperty('Label', $tag_label);
306
        $data->setProperty('Label', $tag_label);
313
        $data->setProperty('WipLabel', $opt_wiplabel ) if $opt_wiplabel;
307
        $data->setProperty('WipLabel', $opt_wiplabel ) if $opt_baselabel;
314
        $data->setProperty('PackageName', $opt_pname);
308
        $data->setProperty('PackageName', $opt_pname);
315
        $data->setProperty('PackageVersion', $opt_pversion);
309
        $data->setProperty('PackageVersion', $opt_pversion);
316
        $data->setProperty('subversion.tag', $session->RmRef);
310
        $data->setProperty('subversion.tag', $session->RmRef);
317
        $data->setProperty('VCS.tag', 'SVN::' . $session->RmRef);
311
        $data->setProperty('VCS.tag', 'SVN::' . $session->RmRef);
318
 
312
 
Line 345... Line 339...
345
    -infofile=path      - Save label information in 'path'
339
    -infofile=path      - Save label information in 'path'
346
    -pname=name         - Name of the package
340
    -pname=name         - Name of the package
347
    -pversion=text      - Package version
341
    -pversion=text      - Package version
348
    -wiplabel=text      - Current package WIP label
342
    -wiplabel=text      - Current package WIP label
349
    -baselabel=text     - Base label for sandbox
343
    -baselabel=text     - Base label for sandbox
-
 
344
    -isawip             - Current package is a WIP
350
 
345
 
351
=head1 OPTIONS
346
=head1 OPTIONS
352
 
347
 
353
=over 8
348
=over 8
354
 
349
 
Line 407... Line 402...
407
This option specifies the package version. It will be used to construct a new
402
This option specifies the package version. It will be used to construct a new
408
label for the package.
403
label for the package.
409
 
404
 
410
=item B<-wiplabel=text>
405
=item B<-wiplabel=text>
411
 
406
 
412
This option controls the manner in which this utility will label the build view.
-
 
413
 
-
 
414
If present, the label specifies a 'Work In Progress' label. The label will be
-
 
415
renamed. At the end of the process the wip label will be deleted from the
-
 
416
the repository.
-
 
417
 
-
 
418
If not present, then the view will be labeled with a new label.
407
Deprecated option. Do not use. Use -isawip instead.
419
 
408
 
420
=item B<-baselabel=text>
409
=item B<-baselabel=text>
421
 
410
 
422
This option specifies the Version Control Label that the current workspace
411
This option specifies the Version Control Label that the current workspace
423
is based on. This may be used to determine the new label for the package.
412
is based on. This may be used to determine the new label for the package.
424
 
413
 
425
This parameter is mandatory.
414
This parameter is mandatory.
426
 
415
 
-
 
416
=item B<-isawip>
-
 
417
 
-
 
418
This option controls the manner in which this utility will label the build view.
-
 
419
 
-
 
420
If present, the label specifies a 'Work In Progress' label. The label will be
-
 
421
renamed. At the end of the process the wip label will be deleted from the
-
 
422
the repository.
-
 
423
 
-
 
424
If not present, then the view will be labeled with a new label.
-
 
425
 
427
=back
426
=back
428
 
427
 
429
=head1 DESCRIPTION
428
=head1 DESCRIPTION
430
 
429
 
431
This utility is used by the automated build system to place build view under
430
This utility is used by the automated build system to place build view under