20 lines
698 B
Bash
Executable file
20 lines
698 B
Bash
Executable file
#!/bin/sh
|
||
TARGET="${TARGET:-../pleroma}" # Where pleroma’s repository is sitting
|
||
static_dir="priv/static" # Set this to instance/static when testing production build
|
||
|
||
if [[ ! -d "${TARGET}/${static_dir}" ]]
|
||
then
|
||
echo "Error: ${TARGET}/${static_dir} 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}/${static_dir}/sw.js"
|
||
rm -rf "${TARGET}/${static_dir}/packs"
|
||
cp -r public/packs "${TARGET}/${static_dir}/packs"
|
||
rm -rf "${TARGET}/${static_dir}/emoji/*.svg"
|
||
cp -r public/emoji/* "${TARGET}/${static_dir}/emoji"
|