[Bps-public-commit] RT-Extension-PreviewInSearch branch master updated. 0.04-12-g5952719
BPS Git Server
git at git.bestpractical.com
Tue Sep 26 17:38:26 UTC 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "RT-Extension-PreviewInSearch".
The branch, master has been updated
via 5952719d5b3fe16265ee4e3b5699fb343498a8c6 (commit)
from cba72bfc856a0351c0bce26bc5fbcf323b33b1ef (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5952719d5b3fe16265ee4e3b5699fb343498a8c6
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Sep 26 13:06:47 2023 -0400
Remove the obsolete BeforeResults callback from old installed version
diff --git a/MANIFEST b/MANIFEST
index 937d5fb..c368df2 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,5 +1,6 @@
Changes
doc/images/preview-screenshot.png
+etc/upgrade/remove_files
html/Callbacks/RT-Extension-PreviewInSearch/Elements/ShowHistoryPage/ModifyPaths
html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults
html/Helpers/TicketPreview
@@ -12,6 +13,7 @@ inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
inc/Module/Install/ReadmeFromPod.pm
inc/Module/Install/RTx.pm
+inc/Module/Install/RTx/Remove.pm
inc/Module/Install/RTx/Runtime.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
diff --git a/META.yml b/META.yml
index 1933f3c..ff9f13f 100644
--- a/META.yml
+++ b/META.yml
@@ -16,6 +16,7 @@ meta-spec:
name: RT-Extension-PreviewInSearch
no_index:
directory:
+ - etc
- html
- inc
requires:
diff --git a/Makefile.PL b/Makefile.PL
index 9258a6a..a67d15b 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,6 +1,6 @@
use inc::Module::Install;
-RTx('RT-Extension-PreviewInSearch');
+RTx('RT-Extension-PreviewInSearch', { remove_files => 1 });
requires_rt '4.0.0';
diff --git a/etc/upgrade/remove_files b/etc/upgrade/remove_files
new file mode 100644
index 0000000..1f5923e
--- /dev/null
+++ b/etc/upgrade/remove_files
@@ -0,0 +1,8 @@
+package Module::Install::RTx;
+
+ at remove_files = (
+ 'html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/BeforeResults',
+);
+
+1;
+
diff --git a/inc/Module/Install/RTx/Remove.pm b/inc/Module/Install/RTx/Remove.pm
new file mode 100644
index 0000000..ee45c4b
--- /dev/null
+++ b/inc/Module/Install/RTx/Remove.pm
@@ -0,0 +1,21 @@
+#line 1
+package Module::Install::RTx::Remove;
+
+use base 'Exporter';
+our @EXPORT = qw/RTxRemove/;
+
+use strict;
+
+#line 27
+
+sub RTxRemove {
+ my $remove_files = shift;
+
+ # Trying the naive unlink first. If issues are reported,
+ # look at ExtUtils::_unlink_or_rename for more cross-platform options.
+ foreach my $file (@$remove_files){
+ next unless -e $file;
+ print "Removing $file\n";
+ unlink($file) or warn "Could not unlink $file: $!";
+ }
+}
-----------------------------------------------------------------------
Summary of changes:
MANIFEST | 2 ++
META.yml | 1 +
Makefile.PL | 2 +-
etc/upgrade/remove_files | 8 ++++++++
inc/Module/Install/RTx/Remove.pm | 21 +++++++++++++++++++++
5 files changed, 33 insertions(+), 1 deletion(-)
create mode 100644 etc/upgrade/remove_files
create mode 100644 inc/Module/Install/RTx/Remove.pm
hooks/post-receive
--
RT-Extension-PreviewInSearch
More information about the Bps-public-commit
mailing list