From 8290bdeb6ef827d3ec78895cc3cbc0b010dc42fe Mon Sep 17 00:00:00 2001 From: Andy Mishechkin <57713077+andy-mishechkin@users.noreply.github.com> Date: Thu, 28 May 2020 17:18:02 +0400 Subject: [PATCH] "Zeit-now" CLI to "zeit-vercel" CLI (#947) * Zeit Now has been replaced to Zeit Vercel * Checking the [now] command has been added * zeit-now -> zeit-vercel * zeit--Now has been renamed to zeit-vercel in Ubuntu temlates --- .../installers/{zeit-now.sh => zeit-vercel.sh} | 17 +++++++++++++---- images/linux/ubuntu1604.json | 2 +- images/linux/ubuntu1804.json | 2 +- images/linux/ubuntu2004.json | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) rename images/linux/scripts/installers/{zeit-now.sh => zeit-vercel.sh} (57%) diff --git a/images/linux/scripts/installers/zeit-now.sh b/images/linux/scripts/installers/zeit-vercel.sh similarity index 57% rename from images/linux/scripts/installers/zeit-now.sh rename to images/linux/scripts/installers/zeit-vercel.sh index 563ba47e..8f5c22e4 100644 --- a/images/linux/scripts/installers/zeit-now.sh +++ b/images/linux/scripts/installers/zeit-vercel.sh @@ -7,16 +7,25 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh -# Install the Zeit Now CLI -npm i -g now +# Install the Zeit Vercel CLI +npm i -g vercel # Validate the installation echo "Validate the installation" +if ! command -v vercel; then + echo "Zeit Vercel CLI was not installed" + exit 1 +fi + +echo "Creating the symlink now to vercel" +ln -s /usr/local/bin/vercel /usr/local/bin/now + +echo "Validate the link" if ! command -v now; then - echo "Zeit Now CLI was not installed" + echo "Now link to Zeit Vercel CLI was not created" exit 1 fi # Document the installed version echo "Document the installed version" -DocumentInstalledItem "Zeit Now CLI ($(now --version))" +DocumentInstalledItem "Zeit Vercel CLI ($(vercel --version))" diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 09e7083d..d90ddb16 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -229,7 +229,7 @@ "{{template_dir}}/scripts/installers/terraform.sh", "{{template_dir}}/scripts/installers/packer.sh", "{{template_dir}}/scripts/installers/vcpkg.sh", - "{{template_dir}}/scripts/installers/zeit-now.sh", + "{{template_dir}}/scripts/installers/zeit-vercel.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh", "{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh" diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index d20432b5..4327b60c 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -233,7 +233,7 @@ "{{template_dir}}/scripts/installers/terraform.sh", "{{template_dir}}/scripts/installers/packer.sh", "{{template_dir}}/scripts/installers/vcpkg.sh", - "{{template_dir}}/scripts/installers/zeit-now.sh", + "{{template_dir}}/scripts/installers/zeit-vercel.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh", "{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh" diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 16852639..34476275 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -230,7 +230,7 @@ "{{template_dir}}/scripts/installers/terraform.sh", "{{template_dir}}/scripts/installers/packer.sh", "{{template_dir}}/scripts/installers/vcpkg.sh", - "{{template_dir}}/scripts/installers/zeit-now.sh", + "{{template_dir}}/scripts/installers/zeit-vercel.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh" ],