Skip to content

Commit

Permalink
Add Deploy functionality to create a paclet and zip from the current …
Browse files Browse the repository at this point in the history
…source
  • Loading branch information
halirutan committed Aug 23, 2018
1 parent 74c8d5b commit b6b4a61
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Rubi/RubiPackageTools.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
* are then exported into the .m package file.
* *)

BeginPackage["Rubi`RubiPackageTools`"];
BeginPackage["Rubi`RubiPackageTools`", "PacletManager`"];

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

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

DeployRubi[] := Module[{file},
file = PackPaclet[$dir];
file = StringReplace[file, ".paclet" -> ".zip"];
If[FileExistsQ[file],
DeleteFile[file]
];
CreateArchive[$dir, file];
];

End[]; (* `Private` *)

EndPackage[]

0 comments on commit b6b4a61

Please sign in to comment.