purescript-contrib/setup-purescript

Allow npm install of spago@next

natefaubion opened this issue · 3 comments

Currently spago is hardcoded to use github releases for legacy spago. Would it be possible to use npm for install for spago next/unstable?

Current workaround is to install spago in a step using npm and invoke from node_modules/.bin or npx.

Yes, we would need to update this:

Spago -> Tarball
{ source: formatGitHub'
-- Spago has changed naming conventions from version to version
if version >= unsafeVersion "0.18.1" then case platform of
Windows -> "Windows"
Mac -> "macOS"
Linux -> "Linux"
else if version == unsafeVersion "0.18.0" then case platform of
Windows -> "windows-latest"
Mac -> "macOS-latest"
Linux -> "linux-latest"
else case platform of
Windows -> "windows"
Mac -> "osx"
Linux -> "linux"
, getExecutablePath: \p -> Path.concat [ p, executableName ]

...such that if the Spago version is greater than 0.90.x then we use NPM as the installation method.

We would also need to update the get latest versions script so that it looks at NPM releases for Spago; right now everything looks at GitHub releases, but the spago@next releases are not happening on GitHub releases at all.

Spago -> fetchFromGitHubReleases