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).
This commit is contained in:
parent
a9a4b1c44e
commit
68a39b2783
30
README.md
30
README.md
|
@ -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. 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. Clone the repo: `git clone https://github.com/vector-im/riot-web.git`
|
||||||
1. Switch to the riot-web directory: `cd riot-web`
|
1. Switch to the riot-web directory: `cd riot-web`
|
||||||
1. Install the prerequisites: `npm install`
|
1. If you're using the `develop` branch, install the develop versions of the
|
||||||
1. If you are using the `develop` branch of vector-web, you will probably need
|
dependencies, as the released ones will be too old:
|
||||||
to rebuild some of the dependencies, due to
|
|
||||||
https://github.com/npm/npm/issues/3055:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
(cd node_modules/matrix-js-sdk && npm install)
|
scripts/fetch-develop-deps.sh
|
||||||
(cd node_modules/matrix-react-sdk && npm install)
|
|
||||||
```
|
```
|
||||||
Whenever you git pull on riot-web you will also probably need to force an update
|
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 matrix-js-sdk
|
||||||
(cd node_modules/matrix-js-sdk && npm install)
|
git pull
|
||||||
(cd node_modules/matrix-react-sdk && npm install)
|
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
|
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
|
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
|
`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
|
up-to-date. Or just use https://riot.im/develop - the continuous integration
|
||||||
release of the develop branch.
|
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
|
1. Configure the app by copying `config.sample.json` to `config.json` and
|
||||||
modifying it (see below for details)
|
modifying it (see below for details)
|
||||||
1. `npm run dist` to build a tarball to deploy. Untaring this file will give
|
1. `npm run dist` to build a tarball to deploy. Untaring this file will give
|
||||||
|
|
16
release.sh
16
release.sh
|
@ -9,6 +9,22 @@ set -e
|
||||||
|
|
||||||
cd `dirname $0`
|
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
|
# bump Electron's package.json first
|
||||||
release="${1#v}"
|
release="${1#v}"
|
||||||
|
|
Loading…
Reference in New Issue