mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 16:46:22 +00:00
32 lines
935 B
Makefile
32 lines
935 B
Makefile
|
# Incluir las variables de entorno
|
||
|
include .env
|
||
|
|
||
|
# Limpiar los archivos de testeo
|
||
|
clean:
|
||
|
rm -rf _sites/test-* _deploy/test-*
|
||
|
|
||
|
# Generar la imagen Docker
|
||
|
build:
|
||
|
docker build --build-arg="RAILS_MASTER_KEY=`cat config/master.key`" -t sutty/sutty .
|
||
|
|
||
|
# Crear el directorio donde se almacenan las gemas binarias
|
||
|
../gems/:
|
||
|
mkdir -p $@
|
||
|
|
||
|
# Compilar todas las gemas binarias y subirlas a gems.sutty.nl para que
|
||
|
# al crear el contenedor no tengamos que compilarlas cada vez
|
||
|
convert-gems: ../gems/
|
||
|
bundle show --paths \
|
||
|
| xargs -I {} sh -c 'test -d {}/ext && basename {}' \
|
||
|
| sed -re "s/-([^-]+)$$/\t\1/" \
|
||
|
| while read gem version; do \
|
||
|
docker run \
|
||
|
-v `readlink -f $<`:/srv/gems \
|
||
|
-v `readlink -f ~/.ccache`:/home/builder/.ccache \
|
||
|
-e HTTP_BASIC_USER=$(HTTP_BASIC_USER) \
|
||
|
-e HTTP_BASIC_PASSWORD=$(HTTP_BASIC_PASSWORD) \
|
||
|
-e GEM=$$gem \
|
||
|
-e VERSION=$$version \
|
||
|
sutty/gem-compiler:latest ; \
|
||
|
done
|