Use npm run install-node-dependencies
Instead of yarn, so we can move to another package manager in the future
This commit is contained in:
parent
70dae47f08
commit
29f55e9115
|
@ -84,7 +84,7 @@ yarn install --pure-lockfile
|
|||
|
||||
Note that development is done on the `develop` branch. If you want to hack on
|
||||
PeerTube, you should switch to that branch. Also note that you have to repeat
|
||||
the `yarn install --pure-lockfile` command.
|
||||
the `npm run install-node-dependencies` command.
|
||||
|
||||
When you create a new branch you should also tell to use your repo for upload
|
||||
not default one. To do just do:
|
||||
|
|
|
@ -16,5 +16,5 @@ tasks:
|
|||
before: export NODE_CONFIG="{\"import\":{\"videos\":{\"torrent\":{\"enabled\":false}}},\"webserver\":{\"hostname\":\"$(gp url 3000 | cut -d/ -f3)\",\"port\":\"443\",\"https\":true}}"
|
||||
init: >
|
||||
psql -h localhost -d postgres --file=support/docker/gitpod/setup_postgres.sql &&
|
||||
yarn install --pure-lockfile
|
||||
npm run install-node-dependencies
|
||||
command: npm run build:server && npm run dev
|
||||
|
|
|
@ -78,8 +78,7 @@ RELEASE_PAGE_URL="https://github.com/Chocobozzz/PeerTube/releases/tag/${VERSION}
|
|||
LATEST_VERSION_DIRECTORY="$PEERTUBE_PATH/versions/peertube-${VERSION}"
|
||||
cd "$LATEST_VERSION_DIRECTORY"
|
||||
|
||||
# Launch yarn to check if we have all required dependencies
|
||||
NOCLIENT=1 yarn install --production --pure-lockfile
|
||||
NOCLIENT=1 npm run install-node-dependencies -- --production
|
||||
|
||||
OLD_VERSION_DIRECTORY=$(readlink "$PEERTUBE_PATH/peertube-latest")
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ sudo yum update
|
|||
sudo yum install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git devtoolset-7
|
||||
```
|
||||
|
||||
5. You need to use a more up to date version of G++ in order to run the yarn install command, hence the installation of devtoolset-7.
|
||||
5. You need to use a more up to date version of G++ in order to run the `npm run install-node-dependencies` command, hence the installation of devtoolset-7.
|
||||
|
||||
```sh
|
||||
sudo scl enable devtoolset-7 bash
|
||||
|
@ -119,7 +119,7 @@ sudo scl enable devtoolset-7 bash
|
|||
Later when you invoke any node command, please prefix them with `CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++`, such as with:
|
||||
|
||||
```sh
|
||||
sudo -H -u peertube CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ yarn install --production --pure-lockfile
|
||||
sudo -H -u peertube CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ npm run install-node-dependencies -- --production
|
||||
```
|
||||
|
||||
6. Initialize the PostgreSQL database:
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
* Check migrations:
|
||||
```
|
||||
npm run clean:server:test
|
||||
git checkout master && rm -r ./node_modules && yarn install --pure-lockfile && npm run build:server
|
||||
git checkout master && rm -r ./node_modules && npm run install-node-dependencies && npm run build:server
|
||||
NODE_APP_INSTANCE=6 NODE_ENV=test node dist/server --benchmark-startup
|
||||
git checkout develop && rm -r ./node_modules && yarn install --pure-lockfile && npm run build:server
|
||||
git checkout develop && rm -r ./node_modules && npm run install-node-dependencies && npm run build:server
|
||||
NODE_APP_INSTANCE=6 NODE_ENV=test node dist/server --benchmark-startup
|
||||
```
|
||||
* Run `rm -rf node_modules && rm -rf client/node_modules && yarn install --pure-lockfile && npm run build` to see if all the supported languages compile correctly
|
||||
* Run `rm -rf node_modules && rm -rf client/node_modules && npm run install-node-dependencies && npm run build` to see if all the supported languages compile correctly
|
||||
* Update https://peertube2.cpy.re and check it works correctly
|
||||
* Check CI tests are green
|
||||
* Run BrowserStack **and** local E2E tests
|
||||
|
|
|
@ -95,7 +95,7 @@ Install Peertube:
|
|||
```bash
|
||||
cd /var/www/peertube
|
||||
sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest
|
||||
cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile
|
||||
cd ./peertube-latest && sudo -H -u peertube npm run install-node-dependencies -- --production
|
||||
```
|
||||
|
||||
### :wrench: PeerTube configuration
|
||||
|
@ -336,7 +336,7 @@ Install node dependencies:
|
|||
|
||||
```bash
|
||||
cd /var/www/peertube/versions/peertube-${VERSION} && \
|
||||
sudo -H -u peertube yarn install --production --pure-lockfile
|
||||
sudo -H -u peertube npm run install-node-dependencies -- --production
|
||||
```
|
||||
|
||||
Copy new configuration defaults values and update your configuration file:
|
||||
|
|
|
@ -29,14 +29,14 @@ USER peertube
|
|||
|
||||
# Install manually client dependencies to apply our network timeout option
|
||||
RUN if [ "${ALREADY_BUILT}" = 0 ]; then \
|
||||
cd client && yarn install --pure-lockfile --network-timeout 1200000 && cd ../ \
|
||||
&& yarn install --pure-lockfile --network-timeout 1200000 \
|
||||
cd client && npm run install-node-dependencies -- --network-timeout 1200000 && cd ../ \
|
||||
&& npm run install-node-dependencies -- --network-timeout 1200000 \
|
||||
&& npm run build; \
|
||||
else \
|
||||
echo "Do not build application inside Docker because of ALREADY_BUILT build argument"; \
|
||||
fi; \
|
||||
rm -rf ./node_modules ./client/node_modules ./client/.angular \
|
||||
&& NOCLIENT=1 yarn install --pure-lockfile --production --network-timeout 1200000 --network-concurrency 20 \
|
||||
&& NOCLIENT=1 npm run install-node-dependencies -- --production --network-timeout 1200000 --network-concurrency 20 \
|
||||
&& yarn cache clean
|
||||
|
||||
USER root
|
||||
|
|
Loading…
Reference in New Issue