2022-08-01 09:38:22 +00:00
|
|
|
#!/bin/bash
|
2022-07-15 09:36:11 +00:00
|
|
|
|
2022-08-01 09:25:59 +00:00
|
|
|
echo "Building silver bullet"
|
2022-07-15 13:33:40 +00:00
|
|
|
npm run clean-build
|
2022-08-01 09:25:59 +00:00
|
|
|
echo "Cleaning website build dir"
|
2022-07-15 12:59:47 +00:00
|
|
|
rm -rf website_build
|
2022-09-05 09:47:30 +00:00
|
|
|
mkdir -p website_build/page/_plug
|
2022-08-01 09:25:59 +00:00
|
|
|
echo "Copying silverbullet runtime files"
|
2022-07-15 12:59:47 +00:00
|
|
|
cp -r packages/web/dist/* website_build/
|
2022-08-01 09:25:59 +00:00
|
|
|
echo "Copying netlify config files"
|
|
|
|
cp website/{_redirects,_headers} website_build/
|
|
|
|
|
|
|
|
echo "Copying website markdown files"
|
2022-09-05 09:47:30 +00:00
|
|
|
cp -r website/* website_build/page/
|
|
|
|
rm website_build/page/{_redirects,_headers}
|
2022-08-01 09:25:59 +00:00
|
|
|
|
|
|
|
echo "Copying standard set of plugs"
|
2022-09-05 09:47:30 +00:00
|
|
|
cp packages/plugs/dist/* website_build/page/_plug/
|
2022-08-01 09:25:59 +00:00
|
|
|
|
|
|
|
echo "Applying rename magic"
|
2022-09-05 09:47:30 +00:00
|
|
|
find website_build/page/ -depth -name "*.md" -exec sh -c 'mv "$1" "${1%.md}"' _ {} \;
|
|
|
|
find website_build/page/ -depth -name "*.plug.json" -exec sh -c 'mv "$1" "${1%.plug.json}"' _ {} \;
|
2022-08-01 09:25:59 +00:00
|
|
|
|
|
|
|
echo "Generating file listing"
|
2022-07-15 13:46:38 +00:00
|
|
|
node scripts/generate_fs_list.js > website_build/index.json
|
2022-08-01 09:25:59 +00:00
|
|
|
|
2022-07-15 13:46:38 +00:00
|
|
|
echo > website_build/empty.md
|