Fix dev install frontend build; add Makefile.

This commit is contained in:
Buster "Silver Eagle" Neece 2021-08-22 18:25:19 -05:00
parent 1af68ca028
commit 0e94e1adc5
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
3 changed files with 49 additions and 7 deletions

39
Makefile Normal file
View File

@ -0,0 +1,39 @@
.PHONY: *
list:
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
up:
docker-compose up -d
down:
docker-compose down
restart: down up
build: # Rebuild all containers and restart
docker-compose build
$(MAKE) restart
update: # Update everything (i.e. after a branch update)
docker-compose build
$(MAKE) down
docker-compose run --rm --user=azuracast web composer install
docker-compose run --rm --user=azuracast web azuracast_cli azuracast:setup:initialize
$(MAKE) frontend-build
$(MAKE) up
test:
docker-compose run --rm --user=azuracast web composer run cleanup-and-test
bash:
docker-compose run --rm --user=azuracast web bash
frontend-bash:
docker-compose -f frontend/docker-compose.yml build
docker-compose -f frontend/docker-compose.yml run --rm frontend
frontend-build:
docker-compose -f frontend/docker-compose.yml build
docker-compose -f frontend/docker-compose.yml run --rm frontend npm run dev-build

View File

@ -373,12 +373,14 @@ install-dev() {
fi
fi
if ask "Clone related repositories?" Y; then
git clone https://github.com/AzuraCast/docker-azuracast-nginx-proxy.git ../docker-azuracast-nginx-proxy
git clone https://github.com/AzuraCast/docker-azuracast-nginx-proxy-letsencrypt.git ../docker-azuracast-nginx-proxy-letsencrypt
git clone https://github.com/AzuraCast/docker-azuracast-db.git ../docker-azuracast-db
git clone https://github.com/AzuraCast/docker-azuracast-redis.git ../docker-azuracast-redis
git clone https://github.com/AzuraCast/docker-azuracast-radio.git ../docker-azuracast-radio
if [[ ! -d ../docker-azuracast-nginx-proxy ]]; then
if ask "Clone related repositories?" Y; then
git clone https://github.com/AzuraCast/docker-azuracast-nginx-proxy.git ../docker-azuracast-nginx-proxy
git clone https://github.com/AzuraCast/docker-azuracast-nginx-proxy-letsencrypt.git ../docker-azuracast-nginx-proxy-letsencrypt
git clone https://github.com/AzuraCast/docker-azuracast-db.git ../docker-azuracast-db
git clone https://github.com/AzuraCast/docker-azuracast-redis.git ../docker-azuracast-redis
git clone https://github.com/AzuraCast/docker-azuracast-radio.git ../docker-azuracast-radio
fi
fi
if [[ ! -f docker-compose.yml ]]; then
@ -407,7 +409,7 @@ install-dev() {
docker-compose run --rm --user="azuracast" web azuracast_install "$@"
docker-compose -f frontend/docker-compose.yml build
docker-compose -f frontend/docker-compose.yml run --rm frontend npm run build
docker-compose -f frontend/docker-compose.yml run --rm frontend npm run dev-build
docker-compose up -d
exit

View File

@ -3,6 +3,7 @@
"license": "Apache-2.0",
"scripts": {
"dev": "npm ci && bash",
"dev-build": "npm ci && npm run build",
"build": "gulp",
"generate-locales": "gettext-extract --attribute v-translate --keywords '$gettext' --output ../resources/locale/frontend.pot $(find ./vue -type f -name '*.vue')",
"import-locales": "gettext-compile --output ../resources/locale/translations.json $(find ../resources/locale/*.UTF-8 -type f -name 'frontend.po')",