Update process to not set deps to #develop

Update README instructions and add checks to release script to
prevent us forgetting to bump the versions of dependencies
(because the check in the main release script will only catch
references to #develop left in, which will no longer be the
failure mode).
pull/3945/head
David Baker 2017-05-19 11:59:27 +01:00
parent a9a4b1c44e
commit 68a39b2783
2 changed files with 35 additions and 11 deletions

View File

@ -58,27 +58,35 @@ to build.
1. Install or update `node.js` so that your `npm` is at least at version `2.0.0`
1. Clone the repo: `git clone https://github.com/vector-im/riot-web.git`
1. Switch to the riot-web directory: `cd riot-web`
1. Install the prerequisites: `npm install`
1. If you are using the `develop` branch of vector-web, you will probably need
to rebuild some of the dependencies, due to
https://github.com/npm/npm/issues/3055:
1. If you're using the `develop` branch, install the develop versions of the
dependencies, as the released ones will be too old:
```
(cd node_modules/matrix-js-sdk && npm install)
(cd node_modules/matrix-react-sdk && npm install)
scripts/fetch-develop-deps.sh
```
Whenever you git pull on riot-web you will also probably need to force an update
to these dependencies - the easiest way is probably:
to these dependencies - the simplest way is to re-run the script, but you can also
manually update and reuild them:
```
rm -rf node_modules/matrjx-{js,react}-sdk && npm i
(cd node_modules/matrix-js-sdk && npm install)
(cd node_modules/matrix-react-sdk && npm install)
cd matrix-js-sdk
git pull
npm install # re-run to pull in any new dependencies
# Depending on your version of npm, npm run build may happen as part of
# the npm install above (https://docs.npmjs.com/misc/scripts#prepublish-and-prepare)
# If in doubt, run it anyway:
npm run build
cd ../matrix-react-sdk
git pull
npm install
npm run build
```
However, we recommend setting up a proper development environment (see "Setting
up a development environment" below) if you want to run your own copy of the
`develop` branch, as it makes it much easier to keep these dependencies
up-to-date. Or just use https://riot.im/develop - the continuous integration
release of the develop branch.
(Note that we don't reference the develop versions in git directly due to
https://github.com/npm/npm/issues/3055)
1. Install the prerequisites: `npm install`
1. Configure the app by copying `config.sample.json` to `config.json` and
modifying it (see below for details)
1. `npm run dist` to build a tarball to deploy. Untaring this file will give

View File

@ -9,6 +9,22 @@ set -e
cd `dirname $0`
for i in matrix-js-sdk matrix-react-sdk
do
depver=`cat package.json | jq -r .dependencies.\"$i\"`
latestver=`npm show $i version`
if [ "$depver" != "$latestver" ]
then
echo "The latest version of $i is $latestver but package.json depends on $depver"
echo -n "Type 'Yes' to continue anyway: "
read resp
if [ "$resp" != "Yes" ]
then
echo "OK, never mind."
exit 1
fi
fi
done
# bump Electron's package.json first
release="${1#v}"