Skip to content

Commit

Permalink
Item11267: Enhance pseudo-install for non-foswiki
Browse files Browse the repository at this point in the history
Adding a -N flag to disable linking of the githooks.  This is useful if
the extension is in a repository that is not part of the foswiki
project.   Also add example of using a local File based repository.
  • Loading branch information
gac410 committed Aug 23, 2014
1 parent 1bfb7b4 commit a493338
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions core/pseudo-install.pl
Expand Up @@ -46,6 +46,7 @@
-[L]ist - list all the foswiki extensions that could be installed by asking
all the extension repositories that are known from the .buildcontrib
-[s]vn - Create subversion connections for git-svn usage
-N[ohooks] - Disable linking of git hooks. Not for foswiki repositories!
Examples:
softlink and enable FirstPlugin and SomeContrib
Expand All @@ -65,8 +66,10 @@
Then, install extensions (missing modules automatically cloned & configured
for git-svn against svn.foswiki.org; 'master' branch is svn's trunk, see [1]):
./pseudo-install.pl developer
Install & enable an extension from an abritrary git repo
./pseudo-install.pl -e git@github.com:/me/MyPlugin.git
Install & enable an extension from an abritrary git repo without enabling hooks
./pseudo-install.pl -e -N git@github.com:/me/MyPlugin.git
Install an extension from a local file based git repo, without hooks
./pseudo-install.pl -N file:///home/git/LocalDataContrib
Install UnitTestContrib and include config values into LocalSite.cfg from
lib/Foswiki/Contrib/UnitTestContrib/AutoBuildSelenium.cfg
./pseudo-install.pl -EAutoBuildSelenium UnitTestContrib
Expand All @@ -88,6 +91,7 @@
my @extensions_path;
my %extensions_extra_config;
my $autoenable = 0;
my $githooks = 1;
my $svnconnect = 0;
my $installing = 1;
my $autoconf = 0;
Expand Down Expand Up @@ -117,6 +121,9 @@
'-m' => sub {
$autoenable = 0;
},
'-N' => sub {
$githooks = 0;
},
'-s' => sub {
$svnconnect = 1;
},
Expand Down Expand Up @@ -473,7 +480,7 @@ sub installModuleByName {
warn "---> No MANIFEST in $module"
. ( $manifest ? "(at $manifest)" : '' ) . "\n";
}
update_githooks_dir( $moduleDir, $module );
update_githooks_dir( $moduleDir, $module ) if ($githooks);

return $libDir;
}
Expand Down Expand Up @@ -1685,7 +1692,7 @@ sub update_githooks_dir {
init_extensions_path();
run();
update_gitignore_file($basedir);
update_githooks_dir( $basedir, 'core' );
update_githooks_dir( $basedir, 'core' ) if ($githooks);

__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Expand Down

0 comments on commit a493338

Please sign in to comment.