crystal-lang / shards

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

Add lib to Makefile #344

Closed straight-shoota closed 4 years ago

RX14 commented 4 years ago

I'm less sure of this now, I think the behaviour should be this:

a good bootstrap for the makefile is:

MOLINILLO_VERSION = $(shell $(CRYSTAL) eval 'require "yaml"; puts YAML.parse(File.read("shard.lock"))["shards"]["molinillo"]["version"]')
MOLINILLO_URL = "https://github.com/crystal-lang/crystal-molinillo/archive/v$(MOLINILLO_VERSION).tar.gz"

with the target

bootstrap:
    mkdir -p lib/molinillo
    curl -L $(MOLINILLO_URL) | tar -xz -C lib/molinillo --strip-components=1
straight-shoota commented 4 years ago

@RX14 I've just enhanced the recipe for lib with bootstrap as a fallback if shards install fails. That way it should work without having to run a second command. If you want to force the boostrap behaviour, you can run make lib SHARDS=false.

RX14 commented 4 years ago

I think this is fine

j8r commented 4 years ago

Is it possible to move forward? Updating the Alpine Linux shards package requires bootstrapping to get molinillo.

straight-shoota commented 4 years ago

Rebased and squashed.