micrate icon indicating copy to clipboard operation
micrate copied to clipboard

Doesn't depend on all database backends.

Open hugopl opened this issue 10 months ago • 1 comments
trafficstars

This works by having a wrapper that compiles the CLI on first use, when the database backend libraries were already downloaded by shards.

Changes:

  • Rename src/micrate-bin.cr to src/micrate-cli.cr
  • Add src/micrate-wrapper.cr that compiles in a post install to bin/micrate.
  • bin/micrate compiles src/micrate-cli to bin/micrate-cli-<VERSION>
  • src/micrate-cli.cr only require database backends found in lib/
  • Do not pin crystal-db version to avoid having to release new micrate versions on every crystal-db release.

Fix #87

[!CAUTION] Despite of the code dealing with windows I only tested this on Linux, would be nice if someone else test this (and possible fix it) on windows before merge.

hugopl avatar Jan 03 '25 18:01 hugopl

@crimson-knight could you review/provide some feedback on this?

hugopl avatar Feb 11 '25 14:02 hugopl