17 lines
505 B
Bash
Executable file
17 lines
505 B
Bash
Executable file
#!/bin/sh
|
||
TARGET="${TARGET:-../pleroma}" # Where pleroma’s repository is sitting
|
||
|
||
if [[ ! -d "${TARGET}/priv/static" ]]
|
||
then
|
||
echo "Error: ${TARGET}/priv/static directory is missing, are you sure TARGET is set to a pleroma repository?"
|
||
echo "Info: TARGET=${TARGET}"
|
||
exit 1
|
||
fi
|
||
|
||
yarn install -D
|
||
|
||
rm -rf public/packs public/assets
|
||
env -i "PATH=$PATH" npm run build
|
||
cp public/assets/sw.js "${TARGET}/priv/static/sw.js"
|
||
rm -rf "${TARGET}/priv/static/packs"
|
||
cp -r public/packs "${TARGET}/priv/static/packs"
|