From 8d9e2c9fbfcd156879a143c5b6dfc8a0fc6712c8 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Mon, 29 Aug 2022 22:34:30 +0200 Subject: [PATCH] [#111,flowershow/upgrade][s]: start of docs on upgrading plus upgrade script from experience upgrading ecosystem in #111. --- packages/flowershow/upgrade.sh | 28 ++++++++++++++++++++++++++++ site/content/docs/upgrade.md | 15 +++++++++++++++ 2 files changed, 43 insertions(+) create mode 100755 packages/flowershow/upgrade.sh create mode 100644 site/content/docs/upgrade.md diff --git a/packages/flowershow/upgrade.sh b/packages/flowershow/upgrade.sh new file mode 100755 index 000000000..b4b3a86a0 --- /dev/null +++ b/packages/flowershow/upgrade.sh @@ -0,0 +1,28 @@ +# upgrade an existing standard nextjs site + +npx degit flowershow/flowershow/templates/default --force + +# files that we should keep the original (probably) +git checkout README.md +git checkout .gitignore + +# stuff that shouldn't be there +rm .env.example +rm -Rf tests +rm netlify.toml +rm netlify.toml +# data seems to be exampleData +rm -Rf data +rm -Rf components/TempCallout.jsx + +# set up custom components +rm -Rf components/custom + +# set up assets +mkdir -p content/assets +rm public/assets +ln -s content/assets public/assets + +# notes +echo "You may need to hand merge the following files:" +echo "pacakge.json, package-lock.json" diff --git a/site/content/docs/upgrade.md b/site/content/docs/upgrade.md new file mode 100644 index 000000000..78c247613 --- /dev/null +++ b/site/content/docs/upgrade.md @@ -0,0 +1,15 @@ +--- +title: Upgrading Flowershow and a Flowershow Site +--- + +For a simple site you can just upgrade Flowershow and republish. + +For a "custom" site i.e. where you are using Flowershow as a NextJS template you will need to do more. + +## Upgrading a NextJS site built with Flowershow + +See `packages/flowershow/upgrade.sh` in the Flowershow github repo. + +You will probably have to do some custom merging. + +See also https://github.com/flowershow/flowershow/issues/111