Skip to content

Commit

Permalink
Item14474: clean up build.pl scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Sep 13, 2017
1 parent 7f54afb commit 91fee26
Show file tree
Hide file tree
Showing 38 changed files with 43 additions and 373 deletions.
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
Expand Down
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Build for BehaviourContrib
#
Expand Down
2 changes: 1 addition & 1 deletion BuildContrib/build.pl
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
unless ( scalar(@ARGV) ) {
print <<DOC;
Build an extension
Expand Down
2 changes: 1 addition & 1 deletion BuildContrib/lib/Foswiki/Contrib/BuildContrib/build.pl
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
Expand Down
2 changes: 1 addition & 1 deletion CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/build.pl
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
use strict;

Expand Down
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Build for CompareRevisionsAddOn
#
Expand Down
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Build for ImageGalleryPlugin
#
Expand Down
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Build for EditTablePlugin
#
Expand Down
67 changes: 1 addition & 66 deletions EmptyJQueryPlugin/lib/Foswiki/Plugins/EmptyJQueryPlugin/build.pl
@@ -1,75 +1,10 @@
#!/usr/bin/perl -w
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
#
# Read the comments at the top of lib/Foswiki/Contrib/Build.pm for
# details of how the build process works, and what files you
# have to provide and where.
#
# Requires the environment variable FOSWIKI_LIBS (a colon-separated path
# list) to be set to point at the build system and any required dependencies.
# Usage: ./build.pl [-n] [-v] [target]
# where [target] is the optional build target (build, test,
# install, release, uninstall), test is the default.
# Two command-line options are supported:
# -n Don't actually do anything, just print commands
# -v Be verbose
#

# Standard preamble
#!/usr/bin/env perl
use strict;
use warnings;

BEGIN { unshift @INC, split( /:/, $ENV{FOSWIKI_LIBS} ); }

use Foswiki::Contrib::Build;

# Create the build object
my $build = new Foswiki::Contrib::Build('EmptyJQueryPlugin');

# Build the target on the command line, or the default target
$build->build( $build->{target} );

=begin TML
You can do a lot more with the build system if you want; for example, to add
a new target, you could do this:
<verbatim>
{
package MyModuleBuild;
our @ISA = qw( Foswiki::Contrib::Build );
sub new {
my $class = shift;
return bless( $class->SUPER::new( "MyModule" ), $class );
}
sub target_mytarget {
my $this = shift;
# Do other build stuff here
}
}
# Create the build object
my $build = new MyModuleBuild();
</verbatim>
You can also specify a different default target server for uploads.
This can be any web on any accessible Foswiki installation.
These defaults will be used when expanding tokens in .txt
files, but be warned, they can be overridden at upload time!
<verbatim>
# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';
# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';
# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';
# Script extension
$build->{UPLOADTARGETSUFFIX} = '';
</verbatim>
=cut
6 changes: 3 additions & 3 deletions EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin/build.pl
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
Expand Down Expand Up @@ -65,9 +65,9 @@
# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';
# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';
$build->{UPLOADTARGETPUB} = 'https://foswiki.org/pub';
# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';
$build->{UPLOADTARGETSCRIPT} = 'https://foswiki.org/bin';
# Script extension
$build->{UPLOADTARGETSUFFIX} = '';
</verbatim>
Expand Down
16 changes: 1 addition & 15 deletions FamFamFamContrib/lib/Foswiki/Contrib/FamFamFamContrib/build.pl
@@ -1,24 +1,10 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
BEGIN {
unshift @INC, split( /:/, $ENV{FOSWIKI_LIBS} );
}
use Foswiki::Contrib::Build;

# Create the build object
$build = new Foswiki::Contrib::Build('FamFamFamContrib');

# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';

# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';

# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';

# Script extension
$build->{UPLOADTARGETSUFFIX} = '';

# Build the target on the command line, or the default target
$build->build( $build->{target} );

2 changes: 1 addition & 1 deletion HistoryPlugin/lib/Foswiki/Plugins/HistoryPlugin/build.pl
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Build for HistoryPlugin
#
Expand Down
19 changes: 1 addition & 18 deletions HomePagePlugin/lib/Foswiki/Plugins/HomePagePlugin/build.pl
@@ -1,27 +1,10 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
BEGIN { unshift @INC, split( /:/, $ENV{FOSWIKI_LIBS} ); }
use Foswiki::Contrib::Build;

# Create the build object
$build = new Foswiki::Contrib::Build('HomePagePlugin');

# (Optional) Set the details of the repository for uploads.
# This can be any web on any accessible Foswiki installation.
# These defaults will be used when expanding tokens in .txt
# files, but be warned, they can be overridden at upload time!

# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';

# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';

# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';

# Script extension
$build->{UPLOADTARGETSUFFIX} = '';

# Build the target on the command line, or the default target
$build->build( $build->{target} );

@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Build for InterwikiPlugin
#
Expand Down
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
Expand Down
2 changes: 1 addition & 1 deletion MailerContrib/lib/Foswiki/Contrib/MailerContrib/build.pl
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
use strict;

BEGIN {
Expand Down
@@ -1,75 +1,10 @@
#!/usr/bin/perl -w
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
#
# Read the comments at the top of lib/Foswiki/Contrib/Build.pm for
# details of how the build process works, and what files you
# have to provide and where.
#
# Requires the environment variable FOSWIKI_LIBS (a colon-separated path
# list) to be set to point at the build system and any required dependencies.
# Usage: ./build.pl [-n] [-v] [target]
# where [target] is the optional build target (build, test,
# install, release, uninstall), test is the default.
# Two command-line options are supported:
# -n Don't actually do anything, just print commands
# -v Be verbose
#

# Standard preamble
#!/usr/bin/env perl
use strict;
use warnings;

BEGIN { unshift @INC, split( /:/, $ENV{FOSWIKI_LIBS} ); }

use Foswiki::Contrib::Build;

# Create the build object
my $build = new Foswiki::Contrib::Build('PatchFoswikiContrib');

# Build the target on the command line, or the default target
$build->build( $build->{target} );

=begin TML
You can do a lot more with the build system if you want; for example, to add
a new target, you could do this:
<verbatim>
{
package MyModuleBuild;
our @ISA = qw( Foswiki::Contrib::Build );
sub new {
my $class = shift;
return bless( $class->SUPER::new( "MyModule" ), $class );
}
sub target_mytarget {
my $this = shift;
# Do other build stuff here
}
}
# Create the build object
my $build = new MyModuleBuild();
</verbatim>
You can also specify a different default target server for uploads.
This can be any web on any accessible Foswiki installation.
These defaults will be used when expanding tokens in .txt
files, but be warned, they can be overridden at upload time!
<verbatim>
# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';
# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';
# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';
# Script extension
$build->{UPLOADTARGETSUFFIX} = '';
</verbatim>
=cut
2 changes: 1 addition & 1 deletion PatternSkin/lib/Foswiki/Contrib/PatternSkin/build.pl
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
use strict;

BEGIN {
Expand Down
@@ -1,23 +1,4 @@
#!/usr/bin/perl -w
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
#
# Read the comments at the top of lib/Foswiki/Contrib/Build.pm for
# details of how the build process works, and what files you
# have to provide and where.
#
# Requires the environment variable FOSWIKI_LIBS (a colon-separated path
# list) to be set to point at the build system and any required dependencies.
# Usage: ./build.pl [-n] [-v] [target]
# where [target] is the optional build target (build, test,
# install, release, uninstall), test is the default.
# Two command-line options are supported:
# -n Don't actually do anything, just print commands
# -v Be verbose
#

# Standard preamble
#!/usr/bin/env perl
use strict;
use warnings;

Expand All @@ -31,45 +12,3 @@
# Build the target on the command line, or the default target
$build->build( $build->{target} );

=begin TML
You can do a lot more with the build system if you want; for example, to add
a new target, you could do this:
<verbatim>
{
package MyModuleBuild;
our @ISA = qw( Foswiki::Contrib::Build );
sub new {
my $class = shift;
return bless( $class->SUPER::new( "MyModule" ), $class );
}
sub target_mytarget {
my $this = shift;
# Do other build stuff here
}
}
# Create the build object
my $build = new MyModuleBuild();
</verbatim>
You can also specify a different default target server for uploads.
This can be any web on any accessible Foswiki installation.
These defaults will be used when expanding tokens in .txt
files, but be warned, they can be overridden at upload time!
<verbatim>
# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';
# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';
# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';
# Script extension
$build->{UPLOADTARGETSUFFIX} = '';
</verbatim>
=cut
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Build for PreferencesPlugin
#
Expand Down
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
Expand Down Expand Up @@ -65,9 +65,9 @@
# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';
# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';
$build->{UPLOADTARGETPUB} = 'https://foswiki.org/pub';
# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';
$build->{UPLOADTARGETSCRIPT} = 'https://foswiki.org/bin';
# Script extension
$build->{UPLOADTARGETSUFFIX} = '';
</verbatim>
Expand Down

0 comments on commit 91fee26

Please sign in to comment.