Skip to content

Commit

Permalink
Use official paclet releases
Browse files Browse the repository at this point in the history
  • Loading branch information
rhennigan committed Sep 22, 2022
1 parent 7b23e51 commit 010f2d2
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/install_dependencies.wls
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ getInput[ name_String ] :=
val
];

$pacletsRoot = "https://www.wolframcloud.com/obj/rhennigan/Paclets";

pacletInstall[ n_String -> v_String ] := pacletInstall[ n <> "-" <> v ];

pacletInstall[ url_String? urlQ ] := Enclose[
Module[ { installed },
Expand All @@ -33,32 +30,6 @@ pacletInstall[ url_String? urlQ ] := Enclose[
]
];

pacletInstall[ spec_String ] := Enclose[
Module[ { url, zip, tmp, pacs, dir, downloaded, installed },
url = URLBuild @ { $pacletsRoot, spec <> ".paclet" };
ConfirmAssert @ StringQ @ url;
print[ "Installing paclet from: ", url ];
If[ StringEndsQ[ url, ".zip" ],
zip = Confirm @ URLDownload @ url;
Confirm @ ExtractArchive[ zip, tmp = CreateDirectory[ ] ];
pacs = FileNames[ "PacletInfo." ~~ ("m"|"wl"), tmp, Infinity ];
dir = DirectoryName @ Confirm @ First[ pacs, $Failed ];
downloaded = CreatePacletArchive @ dir,
downloaded = url
];
installed = PacletInstall[ downloaded, ForceVersionInstall -> True ];
If[ PacletObjectQ @ installed,
print[ "Paclet installed to: ", installed[ "Location" ] ],
print[ "::error:: Paclet installation failed: ", installed ];
Exit[ 1 ]
]
],
Function[
print[ "::error:: Paclet installation failed: ", spec ];
Exit[ 1 ]
]
];


urlQ[ url_String ] := StringQ @ URLParse[ url, "Scheme" ];
urlQ[ ___ ] := False;
Expand Down Expand Up @@ -87,9 +58,6 @@ toPacletCICDURL[ vers_String ] :=
]
];

pacletInstall[ "DefinitionNotebookClient" -> "1.9.0" ];
pacletInstall[ "PacletResource" -> "0.10.0" ];
pacletInstall[ "ResourceSystemClient" -> "1.24.0" ];

pacVer = getInput[ "PACLET_CICD_VERSION" ];
pacURL = toPacletCICDURL @ pacVer;
Expand Down

0 comments on commit 010f2d2

Please sign in to comment.