File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ if [ -z "${DEPLOY_PASSWORD+xxx}" ]; then echo "DEPLOY_PASSWORD not set" && exit;
1818# save version
1919PLEBONES_VERSION=$( node -e " console.log(require('../package.json').version)" )
2020PLEBONES_HTML_NAME=" plebones-html-$PLEBONES_VERSION "
21+ PLEBONES_PREVIOUS_VERSIONS=$( git tag | sed ' s/v//g' | tr ' \n' ' ' )
2122
2223SCRIPT="
2324# download html
@@ -30,6 +31,21 @@ wget https://github.com/plebbit/plebones/releases/download/v$PLEBONES_VERSION/$P
3031unzip $PLEBONES_HTML_NAME .zip || exit
3132rm $PLEBONES_HTML_NAME .zip || exit
3233
34+ # add previous versions as folders e.g. /0.1.1
35+ cd $PLEBONES_HTML_NAME
36+ for PLEBONES_PREVIOUS_VERSION in $PLEBONES_PREVIOUS_VERSIONS
37+ do
38+ # download previous version
39+ PLEBONES_PREVIOUS_VERSION_HTML_NAME=" plebones-html-\$ PLEBONES_PREVIOUS_VERSION"
40+ echo \$ PLEBONES_PREVIOUS_VERSION_HTML_NAME
41+ wget https://github.com/plebbit/plebones/releases/download/v\$ PLEBONES_PREVIOUS_VERSION/\$ PLEBONES_PREVIOUS_VERSION_HTML_NAME.zip
42+ # extract previous version html
43+ unzip \$ PLEBONES_PREVIOUS_VERSION_HTML_NAME.zip
44+ rm \$ PLEBONES_PREVIOUS_VERSION_HTML_NAME.zip
45+ mv \$ PLEBONES_PREVIOUS_VERSION_HTML_NAME \$ PLEBONES_PREVIOUS_VERSION
46+ done
47+ cd ..
48+
3349# add to ipfs
3450CID=\` ipfs add --recursive --pin --quieter $PLEBONES_HTML_NAME | tail -n 1\`
3551ipfs pin add --recursive \"\$ CID\"
You can’t perform that action at this time.
0 commit comments