5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 02:31:41 +00:00

fix: los assets los compila la ci

This commit is contained in:
f 2023-03-16 12:29:57 -03:00
parent ddb4520a86
commit 2654a5c977

View file

@ -48,9 +48,6 @@ help: always ## Ayuda
@echo -e "\nArgumentos:\n"
@grep -E "^[a-z\-]+ \?=.*##" Makefile | sed -re "s/(.*) \?=.*##(.*)/\1;\2/" | column -s ";" -t | sed -re "s/^([^ ]+) /\x1B[38;5;197m\1\x1B[0m/"
assets: public/packs/manifest.json.br ## Compilar los assets
git add public/assets/ public/packs/ && git commit -m "assets [skip ci]"
test: always ## Ejecutar los tests
$(MAKE) rake args="test RAILS_ENV=test $(args)"
@ -111,19 +108,13 @@ save: ## Subir la imagen Docker al nodo delegado
date +%F | xargs -I {} git tag -f $(container)-{}
@echo -e "\a"
ota: assets ## Actualizar Rails en el nodo delegado
ota: ## Actualizar Rails en el nodo delegado
git push
ssh $(delegate) git -C /srv/sutty/srv/http/panel.sutty.nl pull
ssh $(delegate) git -C /srv/sutty/srv/http/panel.sutty.nl lfs prune
ssh $(delegate) chown -R 1000:82 /srv/sutty/srv/http/panel.sutty.nl
ssh $(delegate) docker exec $(container) rails reload
# Todos los archivos de assets. Si alguno cambia, se van a recompilar
# los assets que luego se suben al nodo delegado.
assets := package.json yarn.lock $(shell find app/assets/ app/javascript/ -type f)
public/packs/manifest.json.br: $(assets)
$(hain) 'PANEL_URL=https://panel.sutty.nl RAILS_ENV=production NODE_ENV=production bundle exec rake assets:precompile assets:clean'
# Correr un test en particular por ejemplo
# `make test/models/usuarie_test.rb`
tests := $(shell find test/ -name "*_test.rb")