mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-08 14:21:05 +00:00
ca9761585a
* Remove git reference from install-app Also fixed issue with missing sites/assets folder * Update custom app guide according to changes * Ignore apps that have no frontend code instead of failing
33 lines
535 B
Bash
Executable File
33 lines
535 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
set -x
|
|
|
|
APP=$1
|
|
|
|
cleanup() {
|
|
rm -rf "apps/$APP"
|
|
rm -rf sites/assets/*
|
|
}
|
|
|
|
cd /frappe-bench
|
|
|
|
if ! test -d "apps/$APP/$APP/public"; then
|
|
cleanup
|
|
exit 0
|
|
fi
|
|
|
|
# Add all not built assets
|
|
cp -r "apps/$APP/$APP/public" "/out/assets/$APP"
|
|
|
|
# Add production node modules
|
|
yarn --cwd "apps/$APP" --prod
|
|
cp -r "apps/$APP/node_modules" "/out/assets/$APP/node_modules"
|
|
|
|
# Add built assets
|
|
yarn --cwd "apps/$APP"
|
|
echo "$APP" >>sites/apps.txt
|
|
yarn --cwd apps/frappe run production --app "$APP"
|
|
cp -r sites/assets /out
|
|
|
|
cleanup
|