From 9d72a8b302a563706d2e36700c225914f2999f7b Mon Sep 17 00:00:00 2001 From: Haydn Ewers Date: Tue, 22 Sep 2015 16:51:14 +0930 Subject: [PATCH] Fix the release script to copy the release across correctly. --- scripts/release | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/release b/scripts/release index 4bc961e..7e76432 100755 --- a/scripts/release +++ b/scripts/release @@ -71,19 +71,26 @@ echo "Updating the website..." tmpdir=$(mktemp -d "${TMPDIR:-/tmp}/release.XXXX") +# Copy dist, docs & example to a temp dir. cp -R dist "$tmpdir/dist" cp -R docs "$tmpdir/docs" cp -R example "$tmpdir/example" +# Checkout the GitHub pages branch. echo "$ git checkout gh-pages" git checkout gh-pages -rm -r example dist/store.js -cp "$tmpdir"/dist/store.js dist/store.js -cp "$tmpdir"/dist/store.js "dist/store.v$version.js" +# Delete the current dist & example dirs. +rm -r dist docs example +# Copy across the new dist, docs & example dirs. +cp -R "$tmpdir"/dist dist +cp -R "$tmpdir"/dist "release/v$version" cp -R "$tmpdir"/docs "docs/v$version" cp -R "$tmpdir"/example example +# Clean-up the temp dir. rm -r $tmpdir +# Fix mentions of the version number. sed -i.bak -E "s/v[0-9]+\.[0-9]+\.[0-9]+/v$version/g" index.html rm index.html.bak +# Add, commit & push. echo "$ git add ." git add . echo "$ git commit -a -m \"Release v$version.\"" -- 2.51.2