Hi Connor,
I currently use Dropbox as a PacletServer and (after switching from Windows to macOS) I have written the following little script for deployment of Paclets (I call it from .zsh
where in .zshrc
I defined a simple alias so that I can conveniently call it from anywhere by deploypaclet pacletdir
.
#!/usr/bin/env wolframscript
(* read raw arguments *)
$numArgs = Length @ $ScriptCommandLine;
$argWorkingDirectory = If[ $numArgs >= 2, $ScriptCommandLine[[2]], Missing[] ];
$argPacletServer = If[$numArgs >2 && DirectoryQ @ $ScriptCommandLine[[3]], $ScriptCommandLine[[3]], Missing[] ];
(* create paclet archive *)
$pacletWorkingDirectory = If[ DirectoryQ @ $argWorkingDirectory, $argWorkingDirectory, Echo["Paclet working directory not found."]; Quit[] ];
$defaultPacletServer = FileNameJoin @ {
$HomeDirectory,
"Dropbox",
"PacletServerDirectory"
}; (* or wherever *)
$pacletSite = FileNameJoin @ {
If[ MissingQ @ $argPacletServer, $defaultPacletServer, $argPacletServer ],
"Paclets"
};
If[ CreatePacletArchive[ $pacletWorkingDirectory, $pacletSite ] === $Failed, Echo["Paclet archive could not be created at given site."]; Quit[] ];
(* build paclet site files *)
$pacletServer = ParentDirectory[ $pacletSite ];
PacletManager`BuildPacletSiteFiles @ $pacletServer;
Print["Paclet deployed to ", $pacletServer ]
Another note: I just posted a question regarding the creation of larger Paclets with interdependencies here. It turns out that this works out nicely with Workbench/Eclipse and you can find the implementation for a function from the main package simply by pressing F3.
I would greatly appreciate, if you guys could come back with more advice to people like me, who still prefer an integrated IDE like Eclipse for developing packages. :)