From 3a3b39a2ac4b42f8eec8cd1d64e636e8e9934553 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 5 Jan 2021 12:01:19 -0300 Subject: [PATCH] compilar todas las gemas binarias --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index df495e7..69bb123 100644 --- a/Makefile +++ b/Makefile @@ -39,14 +39,16 @@ load: mkdir -p $@ gem_dir := $(shell readlink -f ../gems) +gem_cache_dir := $(gem_dir)/cache +gem_binary_dir := $(gem_dir)/$(alpine_version) ifeq ($(MAKECMDGOALS),build-gems) -gems := $(shell bundle show --paths | xargs -I {} sh -c 'test -f {}/ext/*/extconf.rb && basename {}') -gems += $(shell bundle show --paths | xargs -I {} sh -c 'test -f {}/ext/extconf.rb && basename {}') -gems := $(patsubst %,$(gem_dir)/cache/%.gem,$(gems)) -gems_musl := $(patsubst $(gem_dir)/cache/%.gem,$(gem_dir)/$(alpine_version)/%-x86_64-linux-musl.gem,$(gems)) +gems := $(shell bundle show --paths | xargs -I {} sh -c 'find {}/ext/ -name extconf.rb &>/dev/null && basename {}') +gems := $(patsubst %-x86_64-linux,%,$(gems)) +gems := $(patsubst %,$(gem_cache_dir)/%.gem,$(gems)) +gems_musl := $(patsubst $(gem_cache_dir)/%.gem,$(gem_binary_dir)/%-x86_64-linux-musl.gem,$(gems)) endif -$(gem_dir)/%-x86_64-linux-musl.gem: +$(gem_binary_dir)/%-x86_64-linux-musl.gem: @docker run \ -v $(gem_dir):/srv/gems \ -v `readlink -f ~/.ccache`:/home/builder/.ccache \