Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new CLI which can snapshot N copies of a directory using git #2

Open
stevebuik opened this issue Apr 24, 2018 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@stevebuik
Copy link
Owner

stevebuik commented Apr 24, 2018

Question: how has my javascript artifact grown over the past N weeks?

Answer: configurable CLI to select specific commits and generate Shadow snapshots for them.

Following the technique seen here https://github.com/Datomic/codeq/blob/master/src/datomic/codeq/core.clj#L422

it should be possible to build a CLI/main fn using tools.cli which accepts args:

  • target directory
  • number (N) of commits to generate
  • interval (maybe in days) between commits. default is subsequent commits i.e. no interval

It can then cycle through the N most recent commits, checking out each one and generating a shadow snapshot with the git hash as the tag name.

Running this tool in CI, before the Stu illumination CLI, will allow full automation.

@stevebuik
Copy link
Owner Author

stevebuik commented Apr 27, 2018

The commit selection fn can be implemented as a multi-method with a CLI arg to select it. this allows a couple of includes strategies (last-N and last-N-days) but allows projects to write a custom strategy and select it via the CLI.

The naming for the tags would be best to be "YYYY-MM-DD" so alpha sort makes sense.

@stevebuik stevebuik added the enhancement New feature or request label Apr 29, 2018
@stevebuik stevebuik changed the title Create a script which can snapshot N copies of a directory using git A new CLI which can snapshot N copies of a directory using git Apr 29, 2018
@stevebuik stevebuik self-assigned this May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant