crystal-lang / shards

Dependency manager for the Crystal language
Other
765 stars 102 forks source link

scripts: prebuild, etc #319

Closed kingsleyh closed 4 years ago

kingsleyh commented 4 years ago

Hi,

I'd like to run a script before build occurs - so what do you think about an extra hook:

scripts:
  postinstall: make 
  prebuild: touch foo.txt

Other helpful hooks could be:

straight-shoota commented 4 years ago

I don't think shards should be expanded to do such build system tasks. It's better to focus on its main features instead of reinventing the wheel. Why not use make as the main tool for organising build recipes instead of calling make from shards Postinstall script?

ysbaddaden commented 4 years ago

Yes, your Makefile or any other build tool (shell script or whatever) would be better suited for this. For example:

scripts:
  postinstall: make shards
all:
  # ...

prebuild:
  touch foo.txt

shards: prebuild all