Skip to content

Commit

Permalink
Item12661: Support recursive MANIFEST files.
Browse files Browse the repository at this point in the history
The check_manifest* scripts still need to be updated to support
this new manifest format.

git-svn-id: http://svn.foswiki.org/trunk@17105 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Nov 21, 2013
1 parent 20c32d0 commit 9c9c373
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
28 changes: 28 additions & 0 deletions BuildContrib/data/System/BuildContrib.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ directive or the end of the file, will not be checked in when installing
to Foswiki 1.0.1 or later

---++++ =!include=

---+++++ =!include= _<path to extension directory>_
MANIFESTs can also include other extensions that have been packaged using
!BuildContrib. For example,
<verbatim>
Expand All @@ -371,6 +373,32 @@ This will include the !WysiwygPlugin in the release package.

Note that there is a script in the Foswiki =tools= directory called =check_manifest.pl= that can be run at any time to check the contents of your MANIFEST against what is checked into Subversion.

---+++++ =!include= _&lt;path to extension MANIFEST* file &gt;_
When the target is a file, and not a directory, !BuildContrib will recursively
process the MANIFEST file inline. This is useful when an extension packages a
complex 3rd party tool, for example, the TinyMCE Editor, and includes multiple
versions. Each copy of the tool can be included with it's own MANIFEST:

Primary MANFIEST
<verbatim>
...
pub/System/TinyMCEPlugin/screenshot.png 0644
!include MANIFEST349
!include MANIFEST357
!include MANIFEST408
pub/System/TinyMCEPlugin/tinymce.gif 0644
...
</verbatim>

Manifest for !TinyMCE version 3.4.9
<verbatim>
!noci
pub/System/TinyMCEPlugin/tinymce-3.4.9/LICENSE.TXT 0644
#pub/System/TinyMCEPlugin/tinymce-3.4.9/build.bat 0644
#pub/System/TinyMCEPlugin/tinymce-3.4.9/build.xml 0644
...
</verbatim>

---++++ =!option=
=!option= is a general directive used to define global options. Currently
supported options are:
Expand Down
13 changes: 12 additions & 1 deletion BuildContrib/lib/Foswiki/Contrib/BuildContrib/BaseBuild.pm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,18 @@ sub readManifest {
while ( $line = <$pf> ) {
next if $line =~ /^\s*(?:#|$)/;
if ( $line =~ /^!include\s+(\S+)\s*$/ ) {
push( @otherModules, $1 );
my $incFile = $1;
if ( -f $incFile ) {
my ( $nfiles, $notherModules, $noptions ) =
Foswiki::Contrib::BuildContrib::BaseBuild::readManifest(
$baseDir, '', $incFile, sub { exit(1) } );
push @files, @$nfiles;
push @otherModules, @$notherModules;
%options = ( %options, %$noptions );
}
else {
push( @otherModules, $incFile );
}
}
elsif ( $line =~ /^!option\s+(\w+)\s*(.*)$/ ) {
$options{$1} = $2;
Expand Down

0 comments on commit 9c9c373

Please sign in to comment.