(version Crystal avec Amber framework) Gérer sa collection de jeux vidéos, consoles et figurines. Et plus si affinités.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
860 B

APP := $(shell head -n 1 "shard.yml"|cut -d ':' -f 2|tr -d ' ')
VERSION := $(shell sed '2!d' "shard.yml"|cut -d ':' -f 2|tr -d ' ')
DEST = /tmp/${APP}
all: build
bin:
mkdir -p bin
bin/${APP}:
crystal build src/${APP}.cr -o bin/${APP} --release --stats
bin/amber:
crystal build lib/amber/src/amber/cli.cr -o bin/amber --stats
build: bin bin/${APP} bin/amber
dependencies:
shards install
${DEST}:
mkdir -p ${DEST}
${APP}-${VERSION}.tar.gz: build ${DEST}
mkdir -p ${DEST}/config/environments/ ${DEST}/src/locales
cp -r bin/ ${DEST}/
cp -r db/ ${DEST}/
cp -r public/ ${DEST}/
cp -r src/locales ${DEST}/src/locales
cp config/environments/.production.enc ${DEST}/config/environments/
tar cvfJ "${APP}-${VERSION}.tar.xz" -C /tmp/ ${APP}
rm -rf ${DEST}
extract: ${APP}-${VERSION}.tar.gz
clean:
rm -f bin/amber
rm -f bin/${APP}
rm -rf ${DEST}