diff --git a/images/linux/scripts/installers/netlify.sh b/images/linux/scripts/installers/netlify.sh new file mode 100644 index 000000000..48afc4826 --- /dev/null +++ b/images/linux/scripts/installers/netlify.sh @@ -0,0 +1,22 @@ +#!/bin/bash +################################################################################ +## File: netlify.sh +## Desc: Installs the Netlify CLI +################################################################################ + +# Source the helpers for use with the script +source $HELPER_SCRIPTS/document.sh + +# Install the Netlify CLI +npm i -g netlify-cli + +# Validate the installation +echo "Validate the installation" +if ! command -v netlify; then + echo "Netlify CLI was not installed" + exit 1 +fi + +# Document the installed version +echo "Document the installed version" +DocumentInstalledItem "Netlify CLI ($(netlify --version))" diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index bef3faa46..cf7aef1ab 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -200,7 +200,8 @@ "{{template_dir}}/scripts/installers/dpkg-config.sh", "{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh", - "{{template_dir}}/scripts/installers/swig.sh" + "{{template_dir}}/scripts/installers/swig.sh", + "{{template_dir}}/scripts/installers/netlify.sh" ], "environment_vars": [ "METADATA_FILE={{user `metadata_file`}}", diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 3e46fe1f7..956e67739 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -204,7 +204,8 @@ "{{template_dir}}/scripts/installers/dpkg-config.sh", "{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh", - "{{template_dir}}/scripts/installers/swig.sh" + "{{template_dir}}/scripts/installers/swig.sh", + "{{template_dir}}/scripts/installers/netlify.sh" ], "environment_vars": [ "METADATA_FILE={{user `metadata_file`}}", diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index e8cd0ec45..ddaac78c5 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -205,7 +205,8 @@ "{{template_dir}}/scripts/installers/vercel.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh", - "{{template_dir}}/scripts/installers/swig.sh" + "{{template_dir}}/scripts/installers/swig.sh", + "{{template_dir}}/scripts/installers/netlify.sh" ], "environment_vars": [ "METADATA_FILE={{user `metadata_file`}}",