[Ubuntu] Fix Netlify installation, move its and vercel's installation to Nodejs.sh (#2666)

* fix netlify installation

* debug

* resolve comments

* small fix
This commit is contained in:
Dibir Magomedsaygitov
2021-02-09 18:57:05 +03:00
committed by GitHub
parent 902346ebcd
commit 395127da8f
8 changed files with 10 additions and 48 deletions

View File

@@ -1,10 +0,0 @@
#!/bin/bash -e
################################################################################
## File: netlify.sh
## Desc: Installs the Netlify CLI
################################################################################
# Install the Netlify CLI
npm i -g netlify-cli
invoke_tests "Tools" "Netlify"

View File

@@ -7,8 +7,15 @@
# Install LTS Node.js and related build tools # Install LTS Node.js and related build tools
curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny - curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny -
~/n/bin/n lts ~/n/bin/n lts
npm install -g grunt gulp n parcel-bundler typescript newman npm install -g grunt gulp n parcel-bundler typescript newman vercel
npm install -g --save-dev webpack webpack-cli npm install -g --save-dev webpack webpack-cli
# Install the Netlify CLI using --unsafe-perm=true options to avoid permission issues
npm install -g --unsafe-perm=true netlify-cli
echo "Creating the symlink for [now] command to vercel CLI"
ln -s /usr/local/bin/vercel /usr/local/bin/now
rm -rf ~/n rm -rf ~/n
# Install Yarn repository and key # Install Yarn repository and key

View File

@@ -1,13 +0,0 @@
#!/bin/bash -e
################################################################################
## File: vercel.sh
## Desc: Installs the Vercel CLI
################################################################################
# Install the Vercel CLI
npm i -g vercel
echo "Creating the symlink for [now] command to vercel CLI"
ln -s /usr/local/bin/vercel /usr/local/bin/now
invoke_tests "CLI.Tools" "Vercel CLI"

View File

@@ -59,14 +59,4 @@ Describe "Oras CLI" {
It "Oras CLI" { It "Oras CLI" {
"oras version" | Should -ReturnZeroExitCode "oras version" | Should -ReturnZeroExitCode
} }
}
Describe "Vercel CLI" {
It "Vercel CLI" {
"vercel --version" | Should -ReturnZeroExitCode
}
It "Validate the symlink link [now]" {
"now --version" | Should -ReturnZeroExitCode
}
} }

View File

@@ -275,12 +275,6 @@ Describe "Conda" {
} }
} }
Describe "Netlify" {
It "netlify" {
"netlify --version" | Should -ReturnZeroExitCode
}
}
Describe "Packer" { Describe "Packer" {
It "packer" { It "packer" {
"packer --version" | Should -ReturnZeroExitCode "packer --version" | Should -ReturnZeroExitCode
@@ -322,7 +316,7 @@ Describe "Containers" -Skip:(Test-IsUbuntu16) {
} }
Describe "Node.js" { Describe "Node.js" {
$testCases = @("node", "grunt", "gulp", "webpack", "parcel", "yarn", "newman") | ForEach-Object { @{NodeCommand = $_} } $testCases = @("node", "grunt", "gulp", "webpack", "parcel", "yarn", "newman", "netlify", "vercel", "now") | ForEach-Object { @{NodeCommand = $_} }
It "<NodeCommand>" -TestCases $testCases { It "<NodeCommand>" -TestCases $testCases {
param ( param (
@@ -330,7 +324,7 @@ Describe "Node.js" {
) )
"$NodeCommand --version" | Should -ReturnZeroExitCode "$NodeCommand --version" | Should -ReturnZeroExitCode
} }
} }
Describe "nvm" { Describe "nvm" {

View File

@@ -235,10 +235,8 @@
"{{template_dir}}/scripts/installers/terraform.sh", "{{template_dir}}/scripts/installers/terraform.sh",
"{{template_dir}}/scripts/installers/packer.sh", "{{template_dir}}/scripts/installers/packer.sh",
"{{template_dir}}/scripts/installers/vcpkg.sh", "{{template_dir}}/scripts/installers/vcpkg.sh",
"{{template_dir}}/scripts/installers/vercel.sh",
"{{template_dir}}/scripts/installers/dpkg-config.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh",
"{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/mongodb.sh",
"{{template_dir}}/scripts/installers/netlify.sh",
"{{template_dir}}/scripts/installers/nginx.sh", "{{template_dir}}/scripts/installers/nginx.sh",
"{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/android.sh",
"{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/pypy.sh",

View File

@@ -240,10 +240,8 @@
"{{template_dir}}/scripts/installers/terraform.sh", "{{template_dir}}/scripts/installers/terraform.sh",
"{{template_dir}}/scripts/installers/packer.sh", "{{template_dir}}/scripts/installers/packer.sh",
"{{template_dir}}/scripts/installers/vcpkg.sh", "{{template_dir}}/scripts/installers/vcpkg.sh",
"{{template_dir}}/scripts/installers/vercel.sh",
"{{template_dir}}/scripts/installers/dpkg-config.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh",
"{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/mongodb.sh",
"{{template_dir}}/scripts/installers/netlify.sh",
"{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/android.sh",
"{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/pypy.sh",
"{{template_dir}}/scripts/installers/python.sh" "{{template_dir}}/scripts/installers/python.sh"

View File

@@ -240,10 +240,8 @@
"{{template_dir}}/scripts/installers/terraform.sh", "{{template_dir}}/scripts/installers/terraform.sh",
"{{template_dir}}/scripts/installers/packer.sh", "{{template_dir}}/scripts/installers/packer.sh",
"{{template_dir}}/scripts/installers/vcpkg.sh", "{{template_dir}}/scripts/installers/vcpkg.sh",
"{{template_dir}}/scripts/installers/vercel.sh",
"{{template_dir}}/scripts/installers/dpkg-config.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh",
"{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/mongodb.sh",
"{{template_dir}}/scripts/installers/netlify.sh",
"{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/android.sh",
"{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/pypy.sh",
"{{template_dir}}/scripts/installers/python.sh", "{{template_dir}}/scripts/installers/python.sh",