purescript-contrib / governance

Guidelines and resources for the PureScript Contributors organization
15 stars 3 forks source link

Complete automated setup scripts #1

Closed thomashoneyman closed 4 years ago

thomashoneyman commented 4 years ago

This library has the set of templates necessary to standardize projects in the Contributors organization, but it doesn't yet have scripts (either as shell scripts or as a PureScript executable like setup-purescript) that automate doing this in Contributors projects.

It's important that standardizing existing libraries and being ready to standardize new libraries is as easy and painless as possible. To that end, the scripts should:

  1. Implement the templates in the target repository, filling in variables like the project name, repository name, and maintainer(s)
  2. Do so without overwriting existing files in the repository, probably by backing them up to a file named <orig>.old.<ext> so that it's easy to manually copy over the contents of those files into the template files
  3. Make it easy to remove the .old files once reconciliation is done

Anything more than this will still have to be done manually, most likely, but this can at least jump start the update process.

thomashoneyman commented 4 years ago

On second thought — perhaps this should copy everything except for the .git, src, test directories and spago.dhall and packages.dhall filed into a new directory, and then write all the files from the template.

You’d then selectively copy things back in to the main directory, delete the temp folder, and push a commit. It’s not a pleasant experience but at least it doesn’t try to be smart and that way you’re starting from a semi-blank slate to copy things back into.

milesfrain commented 4 years ago

I'm happy to dig into this, but probably won't start until after Tuesday, so don't let me block anyone else who wants to get started earlier. Also, should I be able to self-assign these issues?

thomashoneyman commented 4 years ago

Sure, feel free to self-assign anything you’d like to if you plan on working on it in a short timeframe

milesfrain commented 4 years ago

Turns out that github doesn't allow self-assignment without being a collaborator on the repo. https://github.com/isaacs/github/issues/100

I'm not seeing an option to self assign on other issues in this repo. Is org "member" status different than repo "collaborator"? image

thomashoneyman commented 4 years ago

Org members aren't automatically added to all repos, but I still thought you could self-assign. I've added you now.

thomashoneyman commented 4 years ago

Another thought -- perhaps something like yeoman or cookiecutter would be a better alternative? New projects can be bootstrapped from the template and existing projects can be updated manually; it also would provide non-Contributors libraries the ability to start with a standard library template.