Skip to content

Commit b6b4a61

Browse files
committed
Add Deploy functionality to create a paclet and zip from the current source
1 parent 74c8d5b commit b6b4a61

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Rubi/RubiPackageTools.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
* are then exported into the .m package file.
1414
* *)
1515

16-
BeginPackage["Rubi`RubiPackageTools`"];
16+
BeginPackage["Rubi`RubiPackageTools`", "PacletManager`"];
1717

1818
BuildIntegrationRules::usage = "BuildIntegrationRules[] creates the .m package files for the rules from the notebooks";
19+
DeployRubi::usage = "DeployRubi[] creates a paclet and zip of the current release and puts it in the parent folder of the Rubi sources.";
1920

2021
Begin["`Private`"];
2122
$dir = DirectoryName@System`Private`$InputFileName;
@@ -52,6 +53,15 @@
5253
sectionComment[message_String] := TemplateApply["\n(* ::Section:: *)\n(* `` *)", message];
5354
subSectionComment[message_String] := TemplateApply["\n(* ::Subsection::Closed:: *)\n(* `` *)", message];
5455

56+
DeployRubi[] := Module[{file},
57+
file = PackPaclet[$dir];
58+
file = StringReplace[file, ".paclet" -> ".zip"];
59+
If[FileExistsQ[file],
60+
DeleteFile[file]
61+
];
62+
CreateArchive[$dir, file];
63+
];
64+
5565
End[]; (* `Private` *)
5666

5767
EndPackage[]

0 commit comments

Comments
 (0)