Skip to content

Commit

Permalink
Omit doc generation scripts from release
Browse files Browse the repository at this point in the history
Also tweak the HTML handling in Build.PL to live in the subclass, and
teach `bin/format_l10n_docs` to parse `.md` or `.mmd` files.
  • Loading branch information
theory committed Feb 21, 2024
1 parent 5a87f3f commit 6310b0d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
11 changes: 5 additions & 6 deletions Build.PL
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ my $class = $build_pkg->subclass(
$self->tap_harness_args->{sources}{pgTAP}{username}
||= $self->$meth
}
# Add html files in lib.
$self->add_build_element('html');
return $self;
}
sub ACTION_tarball_name { print shift->dist_dir . ".tar.gz\n" }
Expand All @@ -40,7 +43,7 @@ my $class = $build_pkg->subclass(
},
);

my $build = $class->new(
$class->new(
module_name => 'PGXN::Manager',
license => 'postgresql',
script_files => 'bin',
Expand Down Expand Up @@ -159,8 +162,4 @@ my $build = $class->new(
repository => 'https://github.com/pgxn/pgxn-manager/',
}
},
);

# Add html files in lib.
$build->add_build_element('html');
$build->create_build_script;
)->create_build_script;
4 changes: 3 additions & 1 deletion MANIFEST.SKIP
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\B\.svn\b
\B\.git

# Avoid Makemaker generated and utility files.
# Avoid MakeMaker generated and utility files.
^Makefile$
\bblib
\bMakeMaker-\d
Expand All @@ -28,6 +28,8 @@

# Avoid build files.
^PGXN-Manager
^bin/format_l10n_docs
^bin/gendoc

# Avoid Pod tests.
t/pod[^.]*\.t
6 changes: 3 additions & 3 deletions bin/format_l10n_docs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env perl -w

# Find all .md files in lib, run them through multimarkdown, and write
# Find all .mm?d files in lib, run them through multimarkdown, and write
# to .html.
#
# brew install multimarkdown
Expand All @@ -15,9 +15,9 @@ use File::Basename qw(basename);
find({
no_chdir => 1,
wanted => sub {
return unless /\.md$/;
return unless /\.mm?d$/;
my $src = $File::Find::name;
my $dst = $src =~ s/\.md$/.html/r;
my $dst = $src =~ s/\.mm?d$/.html/r;
my @cmd = ('multimarkdown', $src, '-o', $dst);
system(@cmd) == 0 or die "system @cmd failed: $?\n"
},
Expand Down

0 comments on commit 6310b0d

Please sign in to comment.