Explorar el Código

Also do the downgrade trick for mesh install of peertube

Bob Mottram hace 7 años
padre
commit
4c5381a018
Se han modificado 1 ficheros con 12 adiciones y 1 borrados
  1. 12
    1
      src/freedombone-app-peertube

+ 12
- 1
src/freedombone-app-peertube Ver fichero

653
 apt-get -y update
653
 apt-get -y update
654
 apt-get -yq install yarn
654
 apt-get -yq install yarn
655
 
655
 
656
-#npm install --arch=$NPM_ARCH -g yarn
656
+#npm install --arch=$NPM_ARCH -g yarn@1.5.1
657
 #if [ ! "\$?" = "0" ]; then
657
 #if [ ! "\$?" = "0" ]; then
658
 #    echo $'PeerTube Failed to install yarn'
658
 #    echo $'PeerTube Failed to install yarn'
659
 #    exit 79353234
659
 #    exit 79353234
675
     echo $'PeerTube failed to run yarn install'
675
     echo $'PeerTube failed to run yarn install'
676
     exit 63754235
676
     exit 63754235
677
 fi
677
 fi
678
+if ! npm install --arch=$NPM_ARCH -g npm@4; then
679
+    # https://github.com/KraigM/homebridge-harmonyhub/issues/119
680
+    echo $'Failed to downgrade npm'
681
+    exit 3476835
682
+fi
683
+cp /root/.npm-global/bin/npm /usr/local/bin/npm
678
 npm install --arch=$NPM_ARCH
684
 npm install --arch=$NPM_ARCH
679
 if [ ! "\$?" = "0" ]; then
685
 if [ ! "\$?" = "0" ]; then
680
     echo $'PeerTube failed to install peertube'
686
     echo $'PeerTube failed to install peertube'
681
     exit 7835243
687
     exit 7835243
682
 fi
688
 fi
689
+if ! npm install --arch=$NPM_ARCH -g "npm@${NPM_VERSION}"; then
690
+    echo $'Failed to restore npm after downgrade'
691
+    exit 5737583
692
+fi
693
+cp /root/.npm-global/bin/npm /usr/local/bin/npm
683
 npm run build --arch=$NPM_ARCH
694
 npm run build --arch=$NPM_ARCH
684
 if [ ! "\$?" = "0" ]; then
695
 if [ ! "\$?" = "0" ]; then
685
     echo $'PeerTube failed to build peertube'
696
     echo $'PeerTube failed to build peertube'