Explorar el Código

Install yarn from debian repo

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

+ 25
- 19
src/freedombone-app-peertube Ver fichero

618
         return
618
         return
619
     fi
619
     fi
620
 
620
 
621
-    chroot "$rootdir" apt-get -yq install ffmpeg
621
+    chroot "$rootdir" apt-get -yq install ffmpeg curl
622
 
622
 
623
     function_check install_postgresql
623
     function_check install_postgresql
624
     install_postgresql
624
     install_postgresql
635
     cd $rootdir$PEERTUBE_DIR
635
     cd $rootdir$PEERTUBE_DIR
636
     git checkout $PEERTUBE_COMMIT -b $PEERTUBE_COMMIT
636
     git checkout $PEERTUBE_COMMIT -b $PEERTUBE_COMMIT
637
 
637
 
638
+
638
     get_npm_arch
639
     get_npm_arch
639
 
640
 
640
     cat <<EOF > $rootdir/usr/bin/install_peertube
641
     cat <<EOF > $rootdir/usr/bin/install_peertube
641
 #!/bin/bash
642
 #!/bin/bash
642
 cd $PEERTUBE_DIR
643
 cd $PEERTUBE_DIR
643
-npm install --arch=$NPM_ARCH -g yarn
644
-if [ ! "\$?" = "0" ]; then
645
-    echo $'PeerTube Failed to install yarn'
646
-    exit 79353234
647
-fi
648
-npm install --arch=$NPM_ARCH webpack --no-optional
649
-if [ ! "\$?" = "0" ]; then
650
-    echo $'PeerTube failed to install webpack'
651
-    exit 68386353
652
-fi
653
-#yarn add -D webpack
644
+curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
645
+echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
646
+apt-get -y update
647
+apt-get -yq install yarn
648
+
649
+#npm install --arch=$NPM_ARCH -g yarn
654
 #if [ ! "\$?" = "0" ]; then
650
 #if [ ! "\$?" = "0" ]; then
655
-#    echo $'PeerTube failed to add webpack'
656
-#    exit 67342823
651
+#    echo $'PeerTube Failed to install yarn'
652
+#    exit 79353234
657
 #fi
653
 #fi
658
-#yarn install --ignore-optional
654
+#npm install --arch=$NPM_ARCH webpack@3.10.0 --no-optional
659
 #if [ ! "\$?" = "0" ]; then
655
 #if [ ! "\$?" = "0" ]; then
660
-#    echo $'PeerTube failed to run yarn install'
661
-#    exit 63754235
656
+#    echo $'PeerTube failed to install webpack'
657
+#    exit 68386353
662
 #fi
658
 #fi
663
-npm install --arch=$NPM_ARCH --no-optional
659
+yarn add -D webpack
660
+if [ ! "\$?" = "0" ]; then
661
+    echo $'PeerTube failed to add webpack'
662
+    exit 67342823
663
+fi
664
+yarn install --ignore-optional
665
+if [ ! "\$?" = "0" ]; then
666
+    echo $'PeerTube failed to run yarn install'
667
+    exit 63754235
668
+fi
669
+npm install --arch=$NPM_ARCH
664
 if [ ! "\$?" = "0" ]; then
670
 if [ ! "\$?" = "0" ]; then
665
     echo $'PeerTube failed to install peertube'
671
     echo $'PeerTube failed to install peertube'
666
     exit 7835243
672
     exit 7835243
667
 fi
673
 fi
668
-npm run build --arch=$NPM_ARCH --no-optional
674
+npm run build --arch=$NPM_ARCH
669
 if [ ! "\$?" = "0" ]; then
675
 if [ ! "\$?" = "0" ]; then
670
     echo $'PeerTube failed to build peertube'
676
     echo $'PeerTube failed to build peertube'
671
     exit 5293593
677
     exit 5293593