purescript / registry-dev

Development work related to the PureScript Registry
https://github.com/purescript/registry
95 stars 80 forks source link

Write manifest files before calling purs publish #676

Closed thomashoneyman closed 9 months ago

thomashoneyman commented 9 months ago

Fixes #675. Specifically, this PR includes two changes:

  1. We make sure to write a purs.json file to disk before calling publishToPursuit, unless the package already contains a purs.json file. The file we write is taken from the manifest index rather than what we've generated in the pipeline run so as to avoid any mismatches with what we published before. This is especially important for packages where we pruned unused dependencies
  2. We were still exercising the rest of the publish pipeline after publishing to Pursuit, ie. uploading to storage and so on. We shouldn't do that — if a package needs to be published to Pursuit only, then we should do that then terminate. This PR fixes that.

I've added a test verifying the behavior. Most of the diff is just indentation.

f-f commented 9 months ago

Lovely, thanks!