From e1ede7dab59c05b66f002249b961c3621da46b8b Mon Sep 17 00:00:00 2001 From: Daniel Braun Date: Thu, 4 Jan 2024 10:37:58 +0000 Subject: [PATCH] [Bug]: Angular CLI is installed before Node Fixes #558 --- src/amplify-cli/devcontainer-feature.json | 5 +- src/amplify-cli/install.sh | 5 +- src/amplify-cli/library_scripts.sh | 45 ++--- src/angular-cli/devcontainer-feature.json | 5 +- src/angular-cli/install.sh | 5 +- src/angular-cli/library_scripts.sh | 45 ++--- src/assemblyscript/devcontainer-feature.json | 5 +- src/assemblyscript/install.sh | 5 +- src/assemblyscript/library_scripts.sh | 45 ++--- src/auditjs/devcontainer-feature.json | 5 +- src/auditjs/install.sh | 5 +- src/auditjs/library_scripts.sh | 45 ++--- src/autoenv/devcontainer-feature.json | 5 +- src/autoenv/install.sh | 5 +- src/autoenv/library_scripts.sh | 45 ++--- src/aws-cdk/devcontainer-feature.json | 5 +- src/aws-cdk/install.sh | 5 +- src/aws-cdk/library_scripts.sh | 45 ++--- .../devcontainer-feature.json | 5 +- src/bigcommerce-stencil-cli/install.sh | 5 +- .../library_scripts.sh | 45 ++--- src/bower/devcontainer-feature.json | 5 +- src/bower/install.sh | 5 +- src/bower/library_scripts.sh | 45 ++--- src/browserify/devcontainer-feature.json | 5 +- src/browserify/install.sh | 5 +- src/browserify/library_scripts.sh | 45 ++--- src/budibase-cli/devcontainer-feature.json | 5 +- src/budibase-cli/install.sh | 5 +- src/budibase-cli/library_scripts.sh | 45 ++--- .../devcontainer-feature.json | 5 +- src/cloudflare-wrangler/install.sh | 5 +- src/cloudflare-wrangler/library_scripts.sh | 45 ++--- src/corepack/README.md | 20 ++ src/corepack/devcontainer-feature.json | 21 +++ src/corepack/install.sh | 23 +++ src/corepack/library_scripts.sh | 172 ++++++++++++++++++ src/cz-cli/devcontainer-feature.json | 5 +- src/cz-cli/install.sh | 5 +- src/cz-cli/library_scripts.sh | 45 ++--- src/eas-cli/devcontainer-feature.json | 5 +- src/eas-cli/install.sh | 5 +- src/eas-cli/library_scripts.sh | 45 ++--- .../devcontainer-feature.json | 5 +- src/edge-impulse-cli/install.sh | 5 +- src/edge-impulse-cli/library_scripts.sh | 45 ++--- src/ember-cli/devcontainer-feature.json | 5 +- src/ember-cli/install.sh | 5 +- src/ember-cli/library_scripts.sh | 45 ++--- src/expo-cli/devcontainer-feature.json | 5 +- src/expo-cli/install.sh | 5 +- src/expo-cli/library_scripts.sh | 45 ++--- .../devcontainer-feature.json | 5 +- src/express-generator/install.sh | 5 +- src/express-generator/library_scripts.sh | 45 ++--- src/firebase-cli/devcontainer-feature.json | 5 +- src/firebase-cli/install.sh | 5 +- src/firebase-cli/library_scripts.sh | 45 ++--- src/fkill/devcontainer-feature.json | 5 +- src/fkill/install.sh | 5 +- src/fkill/library_scripts.sh | 45 ++--- src/former2-cli/devcontainer-feature.json | 5 +- src/former2-cli/install.sh | 5 +- src/former2-cli/library_scripts.sh | 45 ++--- src/ganache/devcontainer-feature.json | 5 +- src/ganache/install.sh | 5 +- src/ganache/library_scripts.sh | 45 ++--- src/gulp-cli/devcontainer-feature.json | 5 +- src/gulp-cli/install.sh | 5 +- src/gulp-cli/library_scripts.sh | 45 ++--- src/hotel/devcontainer-feature.json | 5 +- src/hotel/install.sh | 5 +- src/hotel/library_scripts.sh | 45 ++--- src/http-server/devcontainer-feature.json | 5 +- src/http-server/install.sh | 5 +- src/http-server/library_scripts.sh | 45 ++--- src/ionic-cli/devcontainer-feature.json | 5 +- src/ionic-cli/install.sh | 5 +- src/ionic-cli/library_scripts.sh | 45 ++--- src/jest/devcontainer-feature.json | 5 +- src/jest/install.sh | 5 +- src/jest/library_scripts.sh | 45 ++--- src/jfrog-cli-npm/devcontainer-feature.json | 5 +- src/jfrog-cli-npm/install.sh | 5 +- src/jfrog-cli-npm/library_scripts.sh | 45 ++--- src/jshint/devcontainer-feature.json | 5 +- src/jshint/install.sh | 5 +- src/jshint/library_scripts.sh | 45 ++--- src/jsii-diff/devcontainer-feature.json | 5 +- src/jsii-diff/install.sh | 5 +- src/jsii-diff/library_scripts.sh | 45 ++--- src/jsii-pacmak/devcontainer-feature.json | 5 +- src/jsii-pacmak/install.sh | 5 +- src/jsii-pacmak/library_scripts.sh | 45 ++--- src/jsii-rosetta/devcontainer-feature.json | 5 +- src/jsii-rosetta/install.sh | 5 +- src/jsii-rosetta/library_scripts.sh | 45 ++--- src/jsii/devcontainer-feature.json | 5 +- src/jsii/install.sh | 5 +- src/jsii/library_scripts.sh | 45 ++--- src/json-server/devcontainer-feature.json | 5 +- src/json-server/install.sh | 5 +- src/json-server/library_scripts.sh | 45 ++--- src/lerna-npm/devcontainer-feature.json | 5 +- src/lerna-npm/install.sh | 5 +- src/lerna-npm/library_scripts.sh | 45 ++--- src/less/devcontainer-feature.json | 5 +- src/less/install.sh | 5 +- src/less/library_scripts.sh | 45 ++--- src/lighthouse-cli/devcontainer-feature.json | 5 +- src/lighthouse-cli/install.sh | 5 +- src/lighthouse-cli/library_scripts.sh | 45 ++--- src/lite-server/devcontainer-feature.json | 5 +- src/lite-server/install.sh | 5 +- src/lite-server/library_scripts.sh | 45 ++--- src/live-server/devcontainer-feature.json | 5 +- src/live-server/install.sh | 5 +- src/live-server/library_scripts.sh | 45 ++--- src/localtunnel-npm/devcontainer-feature.json | 5 +- src/localtunnel-npm/install.sh | 5 +- src/localtunnel-npm/library_scripts.sh | 45 ++--- .../devcontainer-feature.json | 5 +- src/markdownlint-cli/install.sh | 5 +- src/markdownlint-cli/library_scripts.sh | 45 ++--- .../devcontainer-feature.json | 5 +- src/markdownlint-cli2/install.sh | 5 +- src/markdownlint-cli2/library_scripts.sh | 45 ++--- src/meteor-cli/devcontainer-feature.json | 5 +- src/meteor-cli/install.sh | 5 +- src/meteor-cli/library_scripts.sh | 45 ++--- src/mocha/devcontainer-feature.json | 5 +- src/mocha/install.sh | 5 +- src/mocha/library_scripts.sh | 47 ++--- src/n8n/devcontainer-feature.json | 5 +- src/n8n/install.sh | 5 +- src/n8n/library_scripts.sh | 45 ++--- src/nestjs-cli/devcontainer-feature.json | 5 +- src/nestjs-cli/install.sh | 5 +- src/nestjs-cli/library_scripts.sh | 45 ++--- src/netlify-cli/devcontainer-feature.json | 5 +- src/netlify-cli/install.sh | 5 +- src/netlify-cli/library_scripts.sh | 45 ++--- src/nx-npm/devcontainer-feature.json | 5 +- src/nx-npm/install.sh | 5 +- src/nx-npm/library_scripts.sh | 45 ++--- src/oclif/devcontainer-feature.json | 5 +- src/oclif/install.sh | 5 +- src/oclif/library_scripts.sh | 45 ++--- src/pnpm/devcontainer-feature.json | 5 +- src/pnpm/install.sh | 5 +- src/pnpm/library_scripts.sh | 45 ++--- .../devcontainer-feature.json | 5 +- src/powerbi-visuals-tools/install.sh | 5 +- src/powerbi-visuals-tools/library_scripts.sh | 45 ++--- src/prettier/devcontainer-feature.json | 5 +- src/prettier/install.sh | 5 +- src/prettier/library_scripts.sh | 45 ++--- src/prisma/devcontainer-feature.json | 5 +- src/prisma/install.sh | 5 +- src/prisma/library_scripts.sh | 45 ++--- src/projen/devcontainer-feature.json | 5 +- src/projen/install.sh | 5 +- src/projen/library_scripts.sh | 45 ++--- src/quasar-cli/devcontainer-feature.json | 5 +- src/quasar-cli/install.sh | 5 +- src/quasar-cli/library_scripts.sh | 45 ++--- src/renovate-cli/devcontainer-feature.json | 5 +- src/renovate-cli/install.sh | 5 +- src/renovate-cli/library_scripts.sh | 45 ++--- src/rollup/devcontainer-feature.json | 5 +- src/rollup/install.sh | 5 +- src/rollup/library_scripts.sh | 45 ++--- src/salesforce-cli/devcontainer-feature.json | 5 +- src/salesforce-cli/install.sh | 5 +- src/salesforce-cli/library_scripts.sh | 45 ++--- src/salesforce-sfdx/devcontainer-feature.json | 5 +- src/salesforce-sfdx/install.sh | 5 +- src/salesforce-sfdx/library_scripts.sh | 45 ++--- src/sanity-cli/devcontainer-feature.json | 5 +- src/sanity-cli/install.sh | 5 +- src/sanity-cli/library_scripts.sh | 45 ++--- src/serverless/devcontainer-feature.json | 5 +- src/serverless/install.sh | 5 +- src/serverless/library_scripts.sh | 45 ++--- src/shopify-cli/devcontainer-feature.json | 5 +- src/shopify-cli/install.sh | 5 +- src/shopify-cli/library_scripts.sh | 45 ++--- src/snyk-cli/devcontainer-feature.json | 5 +- src/snyk-cli/install.sh | 5 +- src/snyk-cli/library_scripts.sh | 45 ++--- .../devcontainer-feature.json | 5 +- src/squarespace-server/install.sh | 5 +- src/squarespace-server/library_scripts.sh | 45 ++--- src/surge-cli/devcontainer-feature.json | 5 +- src/surge-cli/install.sh | 5 +- src/surge-cli/library_scripts.sh | 45 ++--- src/tfcdk-cli/devcontainer-feature.json | 5 +- src/tfcdk-cli/install.sh | 5 +- src/tfcdk-cli/library_scripts.sh | 45 ++--- src/tldr/devcontainer-feature.json | 5 +- src/tldr/install.sh | 5 +- src/tldr/library_scripts.sh | 45 ++--- src/tooljet-cli/devcontainer-feature.json | 5 +- src/tooljet-cli/install.sh | 5 +- src/tooljet-cli/library_scripts.sh | 45 ++--- src/trello-cli/devcontainer-feature.json | 5 +- src/trello-cli/install.sh | 5 +- src/trello-cli/library_scripts.sh | 45 ++--- src/truffle/devcontainer-feature.json | 5 +- src/truffle/install.sh | 5 +- src/truffle/library_scripts.sh | 45 ++--- src/ts-node/devcontainer-feature.json | 5 +- src/ts-node/install.sh | 5 +- src/ts-node/library_scripts.sh | 45 ++--- src/tsx/devcontainer-feature.json | 5 +- src/tsx/install.sh | 5 +- src/tsx/library_scripts.sh | 45 ++--- src/turborepo-npm/devcontainer-feature.json | 5 +- src/turborepo-npm/install.sh | 5 +- src/turborepo-npm/library_scripts.sh | 45 ++--- src/typescript/devcontainer-feature.json | 5 +- src/typescript/install.sh | 5 +- src/typescript/library_scripts.sh | 45 ++--- src/vercel-cli/devcontainer-feature.json | 5 +- src/vercel-cli/install.sh | 5 +- src/vercel-cli/library_scripts.sh | 45 ++--- src/vercel-ncc/devcontainer-feature.json | 5 +- src/vercel-ncc/install.sh | 5 +- src/vercel-ncc/library_scripts.sh | 45 ++--- src/vercel-pkg/devcontainer-feature.json | 5 +- src/vercel-pkg/install.sh | 5 +- src/vercel-pkg/library_scripts.sh | 45 ++--- src/vercel-release/devcontainer-feature.json | 5 +- src/vercel-release/install.sh | 5 +- src/vercel-release/library_scripts.sh | 45 ++--- src/vercel-serve/devcontainer-feature.json | 5 +- src/vercel-serve/install.sh | 5 +- src/vercel-serve/library_scripts.sh | 45 ++--- src/vtop/devcontainer-feature.json | 5 +- src/vtop/install.sh | 5 +- src/vtop/library_scripts.sh | 45 ++--- src/vue-cli/devcontainer-feature.json | 5 +- src/vue-cli/install.sh | 5 +- src/vue-cli/library_scripts.sh | 45 ++--- test/corepack/scenarios.json | 8 + test/corepack/test.sh | 9 + test/tfcdk-cli/scenarios.json | 4 +- test/tfcdk-cli/test_specific_version.sh | 2 +- 248 files changed, 2178 insertions(+), 2483 deletions(-) create mode 100644 src/corepack/README.md create mode 100644 src/corepack/devcontainer-feature.json create mode 100755 src/corepack/install.sh create mode 100644 src/corepack/library_scripts.sh create mode 100644 test/corepack/scenarios.json create mode 100755 test/corepack/test.sh diff --git a/src/amplify-cli/devcontainer-feature.json b/src/amplify-cli/devcontainer-feature.json index 6e1451b0b..80df8306e 100644 --- a/src/amplify-cli/devcontainer-feature.json +++ b/src/amplify-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "amplify-cli", - "version": "2.0.14", + "version": "2.0.15", "name": "AWS Amplify CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/amplify-cli", "description": "The Amplify Command Line Interface (CLI) is a unified toolchain to create AWS cloud services for your app. Let's go ahead and install the Amplify CLI.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/amplify-cli/install.sh b/src/amplify-cli/install.sh index 67d5431a9..7a8067587 100755 --- a/src/amplify-cli/install.sh +++ b/src/amplify-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/amplify-cli/library_scripts.sh b/src/amplify-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/amplify-cli/library_scripts.sh +++ b/src/amplify-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/angular-cli/devcontainer-feature.json b/src/angular-cli/devcontainer-feature.json index c650d2e95..19924d87a 100644 --- a/src/angular-cli/devcontainer-feature.json +++ b/src/angular-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "angular-cli", - "version": "2.0.14", + "version": "2.0.15", "name": "Angular CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/angular-cli", "description": "Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a command shell.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/angular-cli/install.sh b/src/angular-cli/install.sh index 9a9049f09..03df44af8 100755 --- a/src/angular-cli/install.sh +++ b/src/angular-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/angular-cli/library_scripts.sh b/src/angular-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/angular-cli/library_scripts.sh +++ b/src/angular-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/assemblyscript/devcontainer-feature.json b/src/assemblyscript/devcontainer-feature.json index 10d454a85..fd5c27eb1 100644 --- a/src/assemblyscript/devcontainer-feature.json +++ b/src/assemblyscript/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "assemblyscript", - "version": "2.0.14", + "version": "2.0.15", "name": "AssemblyScript (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/assemblyscript", "description": "AssemblyScript compiles a variant of TypeScript to WebAssembly using Binaryen.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/assemblyscript/install.sh b/src/assemblyscript/install.sh index 8a51d6aa8..21684aaed 100755 --- a/src/assemblyscript/install.sh +++ b/src/assemblyscript/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/assemblyscript/library_scripts.sh b/src/assemblyscript/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/assemblyscript/library_scripts.sh +++ b/src/assemblyscript/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/auditjs/devcontainer-feature.json b/src/auditjs/devcontainer-feature.json index 5c914fa6a..9e383fd3d 100644 --- a/src/auditjs/devcontainer-feature.json +++ b/src/auditjs/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "auditjs", - "version": "1.0.4", + "version": "1.0.5", "name": "AuditJS (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/auditjs", "description": "AuditJS audits an NPM package.json file to identify known vulnerabilities.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/auditjs/install.sh b/src/auditjs/install.sh index 5bcd0b15c..0babae28a 100755 --- a/src/auditjs/install.sh +++ b/src/auditjs/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/auditjs/library_scripts.sh b/src/auditjs/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/auditjs/library_scripts.sh +++ b/src/auditjs/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/autoenv/devcontainer-feature.json b/src/autoenv/devcontainer-feature.json index 740862f5f..deb37389e 100644 --- a/src/autoenv/devcontainer-feature.json +++ b/src/autoenv/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "autoenv", - "version": "1.0.4", + "version": "1.0.5", "name": "Autoenv (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/autoenv", "description": "Autoenv is a tool which automatically reads and setups configuration from a . env file when you cd to a directory.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/autoenv/install.sh b/src/autoenv/install.sh index 3a880b1dc..3c9bfb8a7 100755 --- a/src/autoenv/install.sh +++ b/src/autoenv/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/autoenv/library_scripts.sh b/src/autoenv/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/autoenv/library_scripts.sh +++ b/src/autoenv/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/aws-cdk/devcontainer-feature.json b/src/aws-cdk/devcontainer-feature.json index e14a120bd..246301656 100644 --- a/src/aws-cdk/devcontainer-feature.json +++ b/src/aws-cdk/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "aws-cdk", - "version": "2.0.14", + "version": "2.0.15", "name": "AWS Cloud Development Kit (AWS CDK) (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/aws-cdk", "description": "AWS CDK is an open-source software development framework to define cloud infrastructure in code and provision it through AWS CloudFormation.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/aws-cdk/install.sh b/src/aws-cdk/install.sh index 27c2088e6..fa1057476 100755 --- a/src/aws-cdk/install.sh +++ b/src/aws-cdk/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/aws-cdk/library_scripts.sh b/src/aws-cdk/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/aws-cdk/library_scripts.sh +++ b/src/aws-cdk/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/bigcommerce-stencil-cli/devcontainer-feature.json b/src/bigcommerce-stencil-cli/devcontainer-feature.json index f1ce621f9..fc6e0afd0 100644 --- a/src/bigcommerce-stencil-cli/devcontainer-feature.json +++ b/src/bigcommerce-stencil-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "bigcommerce-stencil-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "BigCommerce Stencil CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/bigcommerce-stencil-cli", "description": "Stencil CLI gives developers the power to locally edit and preview themes with no impact to a merchant\u2019s live storefront, and it's built-in Browsersync(opens in a new tab) capabilities make simultaneous testing across desktop, mobile, and tablet devices a breeze. Once work is complete, developers can push themes to BigCommerce storefronts (and set them live) using Stencil CLI's simple, yet powerful commands.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/bigcommerce-stencil-cli/install.sh b/src/bigcommerce-stencil-cli/install.sh index 00630ee66..c1b289456 100755 --- a/src/bigcommerce-stencil-cli/install.sh +++ b/src/bigcommerce-stencil-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/bigcommerce-stencil-cli/library_scripts.sh b/src/bigcommerce-stencil-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/bigcommerce-stencil-cli/library_scripts.sh +++ b/src/bigcommerce-stencil-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/bower/devcontainer-feature.json b/src/bower/devcontainer-feature.json index 73458d059..7593daa58 100644 --- a/src/bower/devcontainer-feature.json +++ b/src/bower/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "bower", - "version": "1.0.1", + "version": "1.0.2", "name": "Bower (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/bower", "description": "Bower offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/bower/install.sh b/src/bower/install.sh index c0a1d20cb..332ff1da4 100755 --- a/src/bower/install.sh +++ b/src/bower/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/bower/library_scripts.sh b/src/bower/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/bower/library_scripts.sh +++ b/src/bower/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/browserify/devcontainer-feature.json b/src/browserify/devcontainer-feature.json index e06db9c09..792fbdd5b 100644 --- a/src/browserify/devcontainer-feature.json +++ b/src/browserify/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "browserify", - "version": "2.0.14", + "version": "2.0.15", "name": "Browserify (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/browserify", "description": "Browserify lets you require('modules') in the browser by bundling up all of your dependencies.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/browserify/install.sh b/src/browserify/install.sh index adb5354a0..b53fe90b9 100755 --- a/src/browserify/install.sh +++ b/src/browserify/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/browserify/library_scripts.sh b/src/browserify/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/browserify/library_scripts.sh +++ b/src/browserify/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/budibase-cli/devcontainer-feature.json b/src/budibase-cli/devcontainer-feature.json index 6056c4670..a5dc0b83b 100644 --- a/src/budibase-cli/devcontainer-feature.json +++ b/src/budibase-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "budibase-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Budibase CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/budibase-cli", "description": "The Budibase CLI tool can be used to create a new Budibase installation, to manage an existing installation, make backups or update a Budibase installation to a new version.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/budibase-cli/install.sh b/src/budibase-cli/install.sh index 1961d852f..12eacc07c 100755 --- a/src/budibase-cli/install.sh +++ b/src/budibase-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/budibase-cli/library_scripts.sh b/src/budibase-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/budibase-cli/library_scripts.sh +++ b/src/budibase-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/cloudflare-wrangler/devcontainer-feature.json b/src/cloudflare-wrangler/devcontainer-feature.json index 7256fe17f..7dbc60020 100644 --- a/src/cloudflare-wrangler/devcontainer-feature.json +++ b/src/cloudflare-wrangler/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "cloudflare-wrangler", - "version": "1.0.1", + "version": "1.0.2", "name": "Cloudflare Workers CLI (Wrangler) (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/cloudflare-wrangler", "description": "The Workers command-line interface, Wrangler, allows you to create, test, and deploy your Workers projects.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/cloudflare-wrangler/install.sh b/src/cloudflare-wrangler/install.sh index d0fcb648e..59b63a9a8 100755 --- a/src/cloudflare-wrangler/install.sh +++ b/src/cloudflare-wrangler/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/cloudflare-wrangler/library_scripts.sh b/src/cloudflare-wrangler/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/cloudflare-wrangler/library_scripts.sh +++ b/src/cloudflare-wrangler/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/corepack/README.md b/src/corepack/README.md new file mode 100644 index 000000000..48ecdd0d1 --- /dev/null +++ b/src/corepack/README.md @@ -0,0 +1,20 @@ + +# Corepack (via npm) (corepack) + +Corepack is a zero-runtime-dependency Node.js script that acts as a bridge between Node.js projects and the package managers they are intended to be used with during development. + +## Example DevContainer Usage + +```json +"features": { + "ghcr.io/devcontainers-contrib/features/corepack:1": {} +} +``` + +## Options + +| Options Id | Description | Type | Default Value | +|-----|-----|-----|-----| +| version | Select the version to install. | string | latest | + + diff --git a/src/corepack/devcontainer-feature.json b/src/corepack/devcontainer-feature.json new file mode 100644 index 000000000..e3cffd53e --- /dev/null +++ b/src/corepack/devcontainer-feature.json @@ -0,0 +1,21 @@ +{ + "id": "corepack", + "version": "1.0.1", + "name": "Corepack (via npm)", + "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/corepack", + "description": "Corepack is a zero-runtime-dependency Node.js script that acts as a bridge between Node.js projects and the package managers they are intended to be used with during development.", + "options": { + "version": { + "default": "latest", + "description": "Select the version to install.", + "proposals": [ + "latest" + ], + "type": "string" + } + }, + "installsAfter": [ + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" + ] +} \ No newline at end of file diff --git a/src/corepack/install.sh b/src/corepack/install.sh new file mode 100755 index 000000000..6f379d778 --- /dev/null +++ b/src/corepack/install.sh @@ -0,0 +1,23 @@ + +set -e + +. ./library_scripts.sh + +# nanolayer is a cli utility which keeps container layers as small as possible +# source code: https://github.com/devcontainers-contrib/nanolayer +# `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, +# and if missing - will download a temporary copy that automatically get deleted at the end +# of the script +ensure_nanolayer nanolayer_location "v0.5.5" + + +$nanolayer_location \ + install \ + devcontainer-feature \ + "ghcr.io/devcontainers-contrib/features/npm-package:1.0.3" \ + --option package='corepack' --option version="$VERSION" + + + +echo 'Done!' + diff --git a/src/corepack/library_scripts.sh b/src/corepack/library_scripts.sh new file mode 100644 index 000000000..0d7f34d4b --- /dev/null +++ b/src/corepack/library_scripts.sh @@ -0,0 +1,172 @@ + + +clean_download() { + # The purpose of this function is to download a file with minimal impact on container layer size + # this means if no valid downloader is found (curl or wget) then we install a downloader (currently wget) in a + # temporary manner, and making sure to + # 1. uninstall the downloader at the return of the function + # 2. revert back any changes to the package installer database/cache (for example apt-get lists) + # The above steps will minimize the leftovers being created while installing the downloader + # Supported distros: + # debian/ubuntu/alpine + + url=$1 + output_location=$2 + tempdir=$(mktemp -d) + downloader_installed="" + + _apt_get_install() { + tempdir=$1 + + # copy current state of apt list - in order to revert back later (minimize contianer layer size) + cp -p -R /var/lib/apt/lists $tempdir + apt-get update -y + apt-get -y install --no-install-recommends wget ca-certificates + } + + _apt_get_cleanup() { + tempdir=$1 + + echo "removing wget" + apt-get -y purge wget --auto-remove + + echo "revert back apt lists" + rm -rf /var/lib/apt/lists/* + rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists + } + + _apk_install() { + tempdir=$1 + # copy current state of apk cache - in order to revert back later (minimize contianer layer size) + cp -p -R /var/cache/apk $tempdir + + apk add --no-cache wget + } + + _apk_cleanup() { + tempdir=$1 + + echo "removing wget" + apk del wget + } + # try to use either wget or curl if one of them already installer + if type curl >/dev/null 2>&1; then + downloader=curl + elif type wget >/dev/null 2>&1; then + downloader=wget + else + downloader="" + fi + + # in case none of them is installed, install wget temporarly + if [ -z $downloader ] ; then + if [ -x "/usr/bin/apt-get" ] ; then + _apt_get_install $tempdir + elif [ -x "/sbin/apk" ] ; then + _apk_install $tempdir + else + echo "distro not supported" + exit 1 + fi + downloader="wget" + downloader_installed="true" + fi + + if [ $downloader = "wget" ] ; then + wget -q $url -O $output_location + else + curl -sfL $url -o $output_location + fi + + # NOTE: the cleanup procedure was not implemented using `trap X RETURN` only because + # alpine lack bash, and RETURN is not a valid signal under sh shell + if ! [ -z $downloader_installed ] ; then + if [ -x "/usr/bin/apt-get" ] ; then + _apt_get_cleanup $tempdir + elif [ -x "/sbin/apk" ] ; then + _apk_cleanup $tempdir + else + echo "distro not supported" + exit 1 + fi + fi + +} + + +ensure_nanolayer() { + # Ensure existance of the nanolayer cli program + local variable_name=$1 + + local required_version=$2 + + local __nanolayer_location="" + + # If possible - try to use an already installed nanolayer + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then + if type nanolayer >/dev/null 2>&1; then + echo "Found a pre-existing nanolayer in PATH" + __nanolayer_location=nanolayer + fi + elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" + fi + + # make sure its of the required version + if ! [ -z "${__nanolayer_location}" ]; then + local current_version + current_version=$($__nanolayer_location --version) + + + if ! [ $current_version == $required_version ]; then + echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" + __nanolayer_location="" + fi + fi + + fi + + # If not previuse installation found, download it temporarly and delete at the end of the script + if [ -z "${__nanolayer_location}" ]; then + + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then + tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) + + clean_up () { + ARG=$? + rm -rf $tmp_dir + exit $ARG + } + trap clean_up EXIT + + + if [ -x "/sbin/apk" ] ; then + clib_type=musl + else + clib_type=gnu + fi + + tar_filename=nanolayer-"$(uname -m)"-unknown-linux-$clib_type.tgz + + # clean download will minimize leftover in case a downloaderlike wget or curl need to be installed + clean_download https://github.com/devcontainers-contrib/cli/releases/download/$required_version/$tar_filename $tmp_dir/$tar_filename + + tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" + chmod a+x $tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer + + + else + echo "No binaries compiled for non-x86-linux architectures yet: $(uname -m)" + exit 1 + fi + fi + + # Expose outside the resolved location + export ${variable_name}=$__nanolayer_location + +} + + diff --git a/src/cz-cli/devcontainer-feature.json b/src/cz-cli/devcontainer-feature.json index 12f7fbd93..491201fea 100644 --- a/src/cz-cli/devcontainer-feature.json +++ b/src/cz-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "cz-cli", - "version": "1.0.0", + "version": "1.0.1", "name": "Commitizen CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/cz-cli", "description": "Commitizen is release management tool designed for teams. Commitizen assumes your team uses a standard way of commiting rules and from that foundation, it can bump your project's version, create the changelog, and update files.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/cz-cli/install.sh b/src/cz-cli/install.sh index fbe3f7f39..6e8e1ddfc 100755 --- a/src/cz-cli/install.sh +++ b/src/cz-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/cz-cli/library_scripts.sh b/src/cz-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/cz-cli/library_scripts.sh +++ b/src/cz-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/eas-cli/devcontainer-feature.json b/src/eas-cli/devcontainer-feature.json index ac74d47e0..f5c69416f 100644 --- a/src/eas-cli/devcontainer-feature.json +++ b/src/eas-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "eas-cli", - "version": "1.0.9", + "version": "1.0.10", "name": "EAS CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/eas-cli", "description": "EAS CLI is the command line app you will use to interact with EAS services from your terminal.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/eas-cli/install.sh b/src/eas-cli/install.sh index 8040c7750..f30ff8a22 100755 --- a/src/eas-cli/install.sh +++ b/src/eas-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/eas-cli/library_scripts.sh b/src/eas-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/eas-cli/library_scripts.sh +++ b/src/eas-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/edge-impulse-cli/devcontainer-feature.json b/src/edge-impulse-cli/devcontainer-feature.json index ec63acfd7..48f21369a 100644 --- a/src/edge-impulse-cli/devcontainer-feature.json +++ b/src/edge-impulse-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "edge-impulse-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Edge Impulse CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/edge-impulse-cli", "description": "Edge Impulse CLI is used to control local devices, act as a proxy to synchronise data for devices that don't have an internet connection, and to upload and convert local files.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/edge-impulse-cli/install.sh b/src/edge-impulse-cli/install.sh index 558ebd1d2..0ac05350e 100755 --- a/src/edge-impulse-cli/install.sh +++ b/src/edge-impulse-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/edge-impulse-cli/library_scripts.sh b/src/edge-impulse-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/edge-impulse-cli/library_scripts.sh +++ b/src/edge-impulse-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/ember-cli/devcontainer-feature.json b/src/ember-cli/devcontainer-feature.json index 85864e657..246a7c6d5 100644 --- a/src/ember-cli/devcontainer-feature.json +++ b/src/ember-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "ember-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Ember CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/ember-cli", "description": "The Ember CLI (command line interface) is the official way to create, build, test, and serve the files that make up an Ember app or addon.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/ember-cli/install.sh b/src/ember-cli/install.sh index 64e4efd83..f4ea83cfa 100755 --- a/src/ember-cli/install.sh +++ b/src/ember-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/ember-cli/library_scripts.sh b/src/ember-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/ember-cli/library_scripts.sh +++ b/src/ember-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/expo-cli/devcontainer-feature.json b/src/expo-cli/devcontainer-feature.json index 8b61cb4fc..e88fb0c14 100644 --- a/src/expo-cli/devcontainer-feature.json +++ b/src/expo-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "expo-cli", - "version": "1.0.9", + "version": "1.0.10", "name": "Expo CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/expo-cli", "description": "The Expo CLI is a command-line tool that is the primary interface between a developer and other Expo tools.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/expo-cli/install.sh b/src/expo-cli/install.sh index 286ab67d5..77391add3 100755 --- a/src/expo-cli/install.sh +++ b/src/expo-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/expo-cli/library_scripts.sh b/src/expo-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/expo-cli/library_scripts.sh +++ b/src/expo-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/express-generator/devcontainer-feature.json b/src/express-generator/devcontainer-feature.json index 78d8d4a7e..fa0180798 100644 --- a/src/express-generator/devcontainer-feature.json +++ b/src/express-generator/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "express-generator", - "version": "2.0.14", + "version": "2.0.15", "name": "Express Application Generator (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/express-generator", "description": "Express Application Generator is a handy tool for creating skeleton Express web apps.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/express-generator/install.sh b/src/express-generator/install.sh index f9f7e69a7..1bb46ba74 100755 --- a/src/express-generator/install.sh +++ b/src/express-generator/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/express-generator/library_scripts.sh b/src/express-generator/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/express-generator/library_scripts.sh +++ b/src/express-generator/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/firebase-cli/devcontainer-feature.json b/src/firebase-cli/devcontainer-feature.json index d3131969d..f4d5d28bc 100644 --- a/src/firebase-cli/devcontainer-feature.json +++ b/src/firebase-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "firebase-cli", - "version": "2.0.14", + "version": "2.0.15", "name": "Firebase CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/firebase-cli", "description": "The Firebase CLI (GitHub) provides a variety of tools for managing, viewing, and deploying to Firebase projects.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/firebase-cli/install.sh b/src/firebase-cli/install.sh index 7a45eae6e..5d63b6d57 100755 --- a/src/firebase-cli/install.sh +++ b/src/firebase-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/firebase-cli/library_scripts.sh b/src/firebase-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/firebase-cli/library_scripts.sh +++ b/src/firebase-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/fkill/devcontainer-feature.json b/src/fkill/devcontainer-feature.json index 403af3e42..a1ea536fa 100644 --- a/src/fkill/devcontainer-feature.json +++ b/src/fkill/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "fkill", - "version": "2.0.14", + "version": "2.0.15", "name": "fkill (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/fkill", "description": "fkill fabulously kill processes. Cross-platform.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/fkill/install.sh b/src/fkill/install.sh index 0e3124a6f..4d5d0dc08 100755 --- a/src/fkill/install.sh +++ b/src/fkill/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/fkill/library_scripts.sh b/src/fkill/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/fkill/library_scripts.sh +++ b/src/fkill/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/former2-cli/devcontainer-feature.json b/src/former2-cli/devcontainer-feature.json index 6ddd65f9e..5c1cdac9f 100644 --- a/src/former2-cli/devcontainer-feature.json +++ b/src/former2-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "former2-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Former2 CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/former2-cli", "description": "The Former2 CLI allows you to use the former2.com tool directly from your command line.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/former2-cli/install.sh b/src/former2-cli/install.sh index 7a751016d..6a63da326 100755 --- a/src/former2-cli/install.sh +++ b/src/former2-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/former2-cli/library_scripts.sh b/src/former2-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/former2-cli/library_scripts.sh +++ b/src/former2-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/ganache/devcontainer-feature.json b/src/ganache/devcontainer-feature.json index 15141a480..78e9fb441 100644 --- a/src/ganache/devcontainer-feature.json +++ b/src/ganache/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "ganache", - "version": "1.0.1", + "version": "1.0.2", "name": "Ganache (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/ganache", "description": "Ganache is an Ethereum simulator that makes developing Ethereum applications faster, easier, and safer. It includes all popular RPC functions and features (like events) and can be run deterministically to make development a breeze.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/ganache/install.sh b/src/ganache/install.sh index 3939e7318..b40362e18 100755 --- a/src/ganache/install.sh +++ b/src/ganache/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/ganache/library_scripts.sh b/src/ganache/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/ganache/library_scripts.sh +++ b/src/ganache/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/gulp-cli/devcontainer-feature.json b/src/gulp-cli/devcontainer-feature.json index 9f609ce98..292f70d35 100644 --- a/src/gulp-cli/devcontainer-feature.json +++ b/src/gulp-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "gulp-cli", - "version": "2.0.14", + "version": "2.0.15", "name": "Gulp CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/gulp-cli", "description": "Gulp CLI is Command Line Utility for Gulp", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/gulp-cli/install.sh b/src/gulp-cli/install.sh index d42c6b0fc..7dddc1faf 100755 --- a/src/gulp-cli/install.sh +++ b/src/gulp-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/gulp-cli/library_scripts.sh b/src/gulp-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/gulp-cli/library_scripts.sh +++ b/src/gulp-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/hotel/devcontainer-feature.json b/src/hotel/devcontainer-feature.json index 915006a34..3df3d0e6e 100644 --- a/src/hotel/devcontainer-feature.json +++ b/src/hotel/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "hotel", - "version": "1.0.2", + "version": "1.0.3", "name": "hotel (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/hotel", "description": "hotel is a simple process manager for developers. Start apps from your browser and access them using local domains.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/hotel/install.sh b/src/hotel/install.sh index efd63ab56..a26a66a34 100755 --- a/src/hotel/install.sh +++ b/src/hotel/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/hotel/library_scripts.sh b/src/hotel/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/hotel/library_scripts.sh +++ b/src/hotel/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/http-server/devcontainer-feature.json b/src/http-server/devcontainer-feature.json index 01e5f422f..e6649f61d 100644 --- a/src/http-server/devcontainer-feature.json +++ b/src/http-server/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "http-server", - "version": "1.0.2", + "version": "1.0.3", "name": "http-server (by http-party) (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/http-server", "description": "http-server is a simple, zero-configuration command-line static HTTP server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development and learning.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/http-server/install.sh b/src/http-server/install.sh index 771d1017a..56a9a4e00 100755 --- a/src/http-server/install.sh +++ b/src/http-server/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/http-server/library_scripts.sh b/src/http-server/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/http-server/library_scripts.sh +++ b/src/http-server/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/ionic-cli/devcontainer-feature.json b/src/ionic-cli/devcontainer-feature.json index be997b539..dd7822d56 100644 --- a/src/ionic-cli/devcontainer-feature.json +++ b/src/ionic-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "ionic-cli", - "version": "2.0.14", + "version": "2.0.15", "name": "Ionic CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/ionic-cli", "description": "The Ionic command-line interface (CLI) is the go-to tool for developing Ionic apps.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/ionic-cli/install.sh b/src/ionic-cli/install.sh index 5bdb4c46b..fb5d0fba6 100755 --- a/src/ionic-cli/install.sh +++ b/src/ionic-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/ionic-cli/library_scripts.sh b/src/ionic-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/ionic-cli/library_scripts.sh +++ b/src/ionic-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/jest/devcontainer-feature.json b/src/jest/devcontainer-feature.json index 3d84a7683..b17bc2c9d 100644 --- a/src/jest/devcontainer-feature.json +++ b/src/jest/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "jest", - "version": "2.0.14", + "version": "2.0.15", "name": "Jest (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/jest", "description": "Jest is a delightful JavaScript Testing Framework with a focus on simplicity", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/jest/install.sh b/src/jest/install.sh index 552030e4f..b7de2b7d4 100755 --- a/src/jest/install.sh +++ b/src/jest/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/jest/library_scripts.sh b/src/jest/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/jest/library_scripts.sh +++ b/src/jest/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/jfrog-cli-npm/devcontainer-feature.json b/src/jfrog-cli-npm/devcontainer-feature.json index 2256ba37a..0cf413d44 100644 --- a/src/jfrog-cli-npm/devcontainer-feature.json +++ b/src/jfrog-cli-npm/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "jfrog-cli-npm", - "version": "1.0.8", + "version": "1.0.9", "name": "JFrog CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/jfrog-cli-npm", "description": "JFrog CLI is a compact and smart client that provides a simple interface that automates access to JFrog products simplifying your automation scripts making them more readable and easier to maintain.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/jfrog-cli-npm/install.sh b/src/jfrog-cli-npm/install.sh index 6219ca5b2..03519d33d 100755 --- a/src/jfrog-cli-npm/install.sh +++ b/src/jfrog-cli-npm/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/jfrog-cli-npm/library_scripts.sh b/src/jfrog-cli-npm/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/jfrog-cli-npm/library_scripts.sh +++ b/src/jfrog-cli-npm/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/jshint/devcontainer-feature.json b/src/jshint/devcontainer-feature.json index ae32caa14..900ba923f 100644 --- a/src/jshint/devcontainer-feature.json +++ b/src/jshint/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "jshint", - "version": "2.0.14", + "version": "2.0.15", "name": "JSHint (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/jshint", "description": "JSHint is a tool that helps to detect errors and potential problems in your JavaScript code.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/jshint/install.sh b/src/jshint/install.sh index ad27e119f..a4e77c4e1 100755 --- a/src/jshint/install.sh +++ b/src/jshint/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/jshint/library_scripts.sh b/src/jshint/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/jshint/library_scripts.sh +++ b/src/jshint/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/jsii-diff/devcontainer-feature.json b/src/jsii-diff/devcontainer-feature.json index 34989d3fd..baea4421f 100644 --- a/src/jsii-diff/devcontainer-feature.json +++ b/src/jsii-diff/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "jsii-diff", - "version": "1.0.1", + "version": "1.0.2", "name": "jsii-diff (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/jsii-diff", "description": "jsii-diff compares two jsii assemblies for compatibility.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/jsii-diff/install.sh b/src/jsii-diff/install.sh index dda9bb47f..9e9636c45 100755 --- a/src/jsii-diff/install.sh +++ b/src/jsii-diff/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/jsii-diff/library_scripts.sh b/src/jsii-diff/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/jsii-diff/library_scripts.sh +++ b/src/jsii-diff/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/jsii-pacmak/devcontainer-feature.json b/src/jsii-pacmak/devcontainer-feature.json index b91d70a9c..7d1576834 100644 --- a/src/jsii-pacmak/devcontainer-feature.json +++ b/src/jsii-pacmak/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "jsii-pacmak", - "version": "1.0.1", + "version": "1.0.2", "name": "jsii-pacmak (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/jsii-pacmak", "description": "jsii-pacmak generates ready-to-publish language-specific packages for jsii modules, part of the jsii project.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/jsii-pacmak/install.sh b/src/jsii-pacmak/install.sh index 6c412c3a6..19f44a183 100755 --- a/src/jsii-pacmak/install.sh +++ b/src/jsii-pacmak/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/jsii-pacmak/library_scripts.sh b/src/jsii-pacmak/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/jsii-pacmak/library_scripts.sh +++ b/src/jsii-pacmak/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/jsii-rosetta/devcontainer-feature.json b/src/jsii-rosetta/devcontainer-feature.json index 0a07e1b52..e387e2cd0 100644 --- a/src/jsii-rosetta/devcontainer-feature.json +++ b/src/jsii-rosetta/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "jsii-rosetta", - "version": "1.0.1", + "version": "1.0.2", "name": "jsii-rosetta (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/jsii-rosetta", "description": "jsii-rosetta is a utility to transcribe example code snippets from TypeScript to other jsii languages.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/jsii-rosetta/install.sh b/src/jsii-rosetta/install.sh index 9e25be081..b4ef51e05 100755 --- a/src/jsii-rosetta/install.sh +++ b/src/jsii-rosetta/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/jsii-rosetta/library_scripts.sh b/src/jsii-rosetta/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/jsii-rosetta/library_scripts.sh +++ b/src/jsii-rosetta/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/jsii/devcontainer-feature.json b/src/jsii/devcontainer-feature.json index 5fce19d4f..c677b41b1 100644 --- a/src/jsii/devcontainer-feature.json +++ b/src/jsii/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "jsii", - "version": "1.0.1", + "version": "1.0.2", "name": "jsii compiler (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/jsii", "description": "jsii allows code in any language to naturally interact with JavaScript classes. It is the technology that enables the AWS Cloud Development Kit to deliver polyglot libraries from a single codebase!", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/jsii/install.sh b/src/jsii/install.sh index b0224948c..8e624b7f1 100755 --- a/src/jsii/install.sh +++ b/src/jsii/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/jsii/library_scripts.sh b/src/jsii/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/jsii/library_scripts.sh +++ b/src/jsii/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/json-server/devcontainer-feature.json b/src/json-server/devcontainer-feature.json index 12e454e5d..671b1bcae 100644 --- a/src/json-server/devcontainer-feature.json +++ b/src/json-server/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "json-server", - "version": "1.0.2", + "version": "1.0.3", "name": "JSON Server (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/json-server", "description": "Get a full fake REST API with zero coding in less than 30 seconds.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/json-server/install.sh b/src/json-server/install.sh index e5d0bc26f..8c8faba89 100755 --- a/src/json-server/install.sh +++ b/src/json-server/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/json-server/library_scripts.sh b/src/json-server/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/json-server/library_scripts.sh +++ b/src/json-server/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/lerna-npm/devcontainer-feature.json b/src/lerna-npm/devcontainer-feature.json index e76e911da..d80891534 100644 --- a/src/lerna-npm/devcontainer-feature.json +++ b/src/lerna-npm/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "lerna-npm", - "version": "1.0.9", + "version": "1.0.10", "name": "Lerna (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/lerna-npm", "description": "Lerna is a fast modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/lerna-npm/install.sh b/src/lerna-npm/install.sh index f19da6b18..0bfa75071 100755 --- a/src/lerna-npm/install.sh +++ b/src/lerna-npm/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/lerna-npm/library_scripts.sh b/src/lerna-npm/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/lerna-npm/library_scripts.sh +++ b/src/lerna-npm/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/less/devcontainer-feature.json b/src/less/devcontainer-feature.json index e469e7681..88d2a724f 100644 --- a/src/less/devcontainer-feature.json +++ b/src/less/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "less", - "version": "2.0.14", + "version": "2.0.15", "name": "Less (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/less", "description": "Less is a backwards-compatible language extension for CSS", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/less/install.sh b/src/less/install.sh index a9939db87..490c2b9b5 100755 --- a/src/less/install.sh +++ b/src/less/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/less/library_scripts.sh b/src/less/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/less/library_scripts.sh +++ b/src/less/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/lighthouse-cli/devcontainer-feature.json b/src/lighthouse-cli/devcontainer-feature.json index d953fef76..3811e7c64 100644 --- a/src/lighthouse-cli/devcontainer-feature.json +++ b/src/lighthouse-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "lighthouse-cli", - "version": "1.0.2", + "version": "1.0.3", "name": "Lighthouse CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/lighthouse-cli", "description": "Lighthouse CLI provides the most flexibility in how Lighthouse runs can be configured and reported. Users who want more advanced usage, or want to run Lighthouse in an automated fashion should use the Node CLI.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/lighthouse-cli/install.sh b/src/lighthouse-cli/install.sh index 6d15159f1..29cf82eb0 100755 --- a/src/lighthouse-cli/install.sh +++ b/src/lighthouse-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/lighthouse-cli/library_scripts.sh b/src/lighthouse-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/lighthouse-cli/library_scripts.sh +++ b/src/lighthouse-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/lite-server/devcontainer-feature.json b/src/lite-server/devcontainer-feature.json index 4e5b3503b..7fcbbd876 100644 --- a/src/lite-server/devcontainer-feature.json +++ b/src/lite-server/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "lite-server", - "version": "1.0.2", + "version": "1.0.3", "name": "lite-server (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/lite-server", "description": "lite-server is a lightweight development only node server that serves a web app, opens it in the browser, refreshes when html or javascript change, injects CSS changes using sockets, and has a fallback page when a route is not found.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/lite-server/install.sh b/src/lite-server/install.sh index 3182451f7..7ee7afc59 100755 --- a/src/lite-server/install.sh +++ b/src/lite-server/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/lite-server/library_scripts.sh b/src/lite-server/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/lite-server/library_scripts.sh +++ b/src/lite-server/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/live-server/devcontainer-feature.json b/src/live-server/devcontainer-feature.json index 1baffb7e8..bc2b97d0f 100644 --- a/src/live-server/devcontainer-feature.json +++ b/src/live-server/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "live-server", - "version": "1.0.2", + "version": "1.0.3", "name": "Live Server (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/live-server", "description": "Live Server is a little development server with live reload capability. Use it for hacking your HTML/JavaScript/CSS files, but not for deploying the final site.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/live-server/install.sh b/src/live-server/install.sh index a09868ad3..4b8cf59f6 100755 --- a/src/live-server/install.sh +++ b/src/live-server/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/live-server/library_scripts.sh b/src/live-server/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/live-server/library_scripts.sh +++ b/src/live-server/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/localtunnel-npm/devcontainer-feature.json b/src/localtunnel-npm/devcontainer-feature.json index 25116ffb8..ab1a9876b 100644 --- a/src/localtunnel-npm/devcontainer-feature.json +++ b/src/localtunnel-npm/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "localtunnel-npm", - "version": "1.0.9", + "version": "1.0.10", "name": "Localtunnel (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/localtunnel-npm", "description": "Localtunnel allows you to easily share a web service on your local development machine without messing with DNS and firewall settings.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/localtunnel-npm/install.sh b/src/localtunnel-npm/install.sh index c1ae8a46a..748c48427 100755 --- a/src/localtunnel-npm/install.sh +++ b/src/localtunnel-npm/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/localtunnel-npm/library_scripts.sh b/src/localtunnel-npm/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/localtunnel-npm/library_scripts.sh +++ b/src/localtunnel-npm/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/markdownlint-cli/devcontainer-feature.json b/src/markdownlint-cli/devcontainer-feature.json index 60118a2a4..c2cc20096 100644 --- a/src/markdownlint-cli/devcontainer-feature.json +++ b/src/markdownlint-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "markdownlint-cli", - "version": "1.0.0", + "version": "1.0.1", "name": "markdownlint-cli (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/markdownlint-cli", "description": "Command Line interface for MarkdownLint", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/markdownlint-cli/install.sh b/src/markdownlint-cli/install.sh index 89fd03cc8..bbc362cb1 100755 --- a/src/markdownlint-cli/install.sh +++ b/src/markdownlint-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/markdownlint-cli/library_scripts.sh b/src/markdownlint-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/markdownlint-cli/library_scripts.sh +++ b/src/markdownlint-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/markdownlint-cli2/devcontainer-feature.json b/src/markdownlint-cli2/devcontainer-feature.json index 71c06322e..f941463d6 100644 --- a/src/markdownlint-cli2/devcontainer-feature.json +++ b/src/markdownlint-cli2/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "markdownlint-cli2", - "version": "1.0.0", + "version": "1.0.1", "name": "markdownlint-cli2 (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/markdownlint-cli2", "description": "A fast, flexible, configuration-based command-line interface for linting Markdown/CommonMark files with the markdownlint library.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/markdownlint-cli2/install.sh b/src/markdownlint-cli2/install.sh index a483438f7..f7959821d 100755 --- a/src/markdownlint-cli2/install.sh +++ b/src/markdownlint-cli2/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/markdownlint-cli2/library_scripts.sh b/src/markdownlint-cli2/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/markdownlint-cli2/library_scripts.sh +++ b/src/markdownlint-cli2/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/meteor-cli/devcontainer-feature.json b/src/meteor-cli/devcontainer-feature.json index 80fe1c92a..c971b8b86 100644 --- a/src/meteor-cli/devcontainer-feature.json +++ b/src/meteor-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "meteor-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Meteor CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/meteor-cli", "description": "Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. Meteor includes a key set of technologies for building connected-client reactive applications, a build tool, and a curated set of packages from the Node.js and general JavaScript community.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/meteor-cli/install.sh b/src/meteor-cli/install.sh index 476a313f0..1f7d47c1e 100755 --- a/src/meteor-cli/install.sh +++ b/src/meteor-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/meteor-cli/library_scripts.sh b/src/meteor-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/meteor-cli/library_scripts.sh +++ b/src/meteor-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/mocha/devcontainer-feature.json b/src/mocha/devcontainer-feature.json index e3c9fc7d5..471a87256 100644 --- a/src/mocha/devcontainer-feature.json +++ b/src/mocha/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "mocha", - "version": "2.0.14", + "version": "2.0.15", "name": "Mocha (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/mocha", "description": "Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/mocha/install.sh b/src/mocha/install.sh index 7be651729..e4490be0d 100755 --- a/src/mocha/install.sh +++ b/src/mocha/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/mocha/library_scripts.sh b/src/mocha/library_scripts.sh index 8c56b8848..0d7f34d4b 100644 --- a/src/mocha/library_scripts.sh +++ b/src/mocha/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,22 +9,22 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 - # copy current state of apt list - in order to revert back later (minimize container layer size) + # copy current state of apt list - in order to revert back later (minimize contianer layer size) cp -p -R /var/lib/apt/lists $tempdir apt-get update -y apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/n8n/devcontainer-feature.json b/src/n8n/devcontainer-feature.json index 6244bc3ef..cd69aef93 100644 --- a/src/n8n/devcontainer-feature.json +++ b/src/n8n/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "n8n", - "version": "1.0.1", + "version": "1.0.2", "name": "n8n (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/n8n", "description": "n8n is a free and source-available fair-code licensed workflow automation tool.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/n8n/install.sh b/src/n8n/install.sh index e87c9e30d..707f3b021 100755 --- a/src/n8n/install.sh +++ b/src/n8n/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/n8n/library_scripts.sh b/src/n8n/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/n8n/library_scripts.sh +++ b/src/n8n/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/nestjs-cli/devcontainer-feature.json b/src/nestjs-cli/devcontainer-feature.json index cc8a56073..46ff923fc 100644 --- a/src/nestjs-cli/devcontainer-feature.json +++ b/src/nestjs-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "nestjs-cli", - "version": "2.0.14", + "version": "2.0.15", "name": "NestJS CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/nestjs-cli", "description": "Nestjs is a progressive Node.js framework for building efficient, reliable and scalable server-side applications.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/nestjs-cli/install.sh b/src/nestjs-cli/install.sh index 128bde126..9dc086c13 100755 --- a/src/nestjs-cli/install.sh +++ b/src/nestjs-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/nestjs-cli/library_scripts.sh b/src/nestjs-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/nestjs-cli/library_scripts.sh +++ b/src/nestjs-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/netlify-cli/devcontainer-feature.json b/src/netlify-cli/devcontainer-feature.json index c8aa41278..4dda447f0 100644 --- a/src/netlify-cli/devcontainer-feature.json +++ b/src/netlify-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "netlify-cli", - "version": "1.0.2", + "version": "1.0.3", "name": "Netlify CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/netlify-cli", "description": "Netlify CLI lets you configure continuous deployment straight from the command line. You can use Netlify CLI to run a local development server that you can share with others, run a local build and plugins, and deploy your site.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/netlify-cli/install.sh b/src/netlify-cli/install.sh index 8f1408c1d..9c7c94ed5 100755 --- a/src/netlify-cli/install.sh +++ b/src/netlify-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/netlify-cli/library_scripts.sh b/src/netlify-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/netlify-cli/library_scripts.sh +++ b/src/netlify-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/nx-npm/devcontainer-feature.json b/src/nx-npm/devcontainer-feature.json index 3be61ec41..5789e2475 100644 --- a/src/nx-npm/devcontainer-feature.json +++ b/src/nx-npm/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "nx-npm", - "version": "1.0.9", + "version": "1.0.10", "name": "nx (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/nx-npm", "description": "Nx is a smart, fast and extensible build system with first class monorepo support and powerful integrations.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/nx-npm/install.sh b/src/nx-npm/install.sh index f3a725fe2..5d7266f39 100755 --- a/src/nx-npm/install.sh +++ b/src/nx-npm/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/nx-npm/library_scripts.sh b/src/nx-npm/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/nx-npm/library_scripts.sh +++ b/src/nx-npm/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/oclif/devcontainer-feature.json b/src/oclif/devcontainer-feature.json index 87864537e..37298f07a 100644 --- a/src/oclif/devcontainer-feature.json +++ b/src/oclif/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "oclif", - "version": "1.0.1", + "version": "1.0.2", "name": "oclif generator (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/oclif", "description": "The oclif generator creates a CLI project in TypeScript to get you started quickly. It requires very few runtime dependencies and has extremely minimal overhead.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/oclif/install.sh b/src/oclif/install.sh index 40cd0f607..b6c81fed1 100755 --- a/src/oclif/install.sh +++ b/src/oclif/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/oclif/library_scripts.sh b/src/oclif/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/oclif/library_scripts.sh +++ b/src/oclif/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/pnpm/devcontainer-feature.json b/src/pnpm/devcontainer-feature.json index c6d314e8e..3e97cb96a 100644 --- a/src/pnpm/devcontainer-feature.json +++ b/src/pnpm/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "pnpm", - "version": "2.0.3", + "version": "2.0.4", "name": "Pnpm (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/pnpm", "description": "Pnpm is a fast and disk space efficient package manager.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/pnpm/install.sh b/src/pnpm/install.sh index 29662050d..fbfbc9fd7 100755 --- a/src/pnpm/install.sh +++ b/src/pnpm/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/pnpm/library_scripts.sh b/src/pnpm/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/pnpm/library_scripts.sh +++ b/src/pnpm/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/powerbi-visuals-tools/devcontainer-feature.json b/src/powerbi-visuals-tools/devcontainer-feature.json index 916f21bc0..0a38e9b68 100644 --- a/src/powerbi-visuals-tools/devcontainer-feature.json +++ b/src/powerbi-visuals-tools/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "powerbi-visuals-tools", - "version": "2.0.14", + "version": "2.0.15", "name": "PowerBI Visual Tools (pbiviz) (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/powerbi-visuals-tools", "description": "PowerBI Visual Tools Contains tools for building/packaging Power BI visuals", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/powerbi-visuals-tools/install.sh b/src/powerbi-visuals-tools/install.sh index e5ec262e6..6f7ac9747 100755 --- a/src/powerbi-visuals-tools/install.sh +++ b/src/powerbi-visuals-tools/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/powerbi-visuals-tools/library_scripts.sh b/src/powerbi-visuals-tools/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/powerbi-visuals-tools/library_scripts.sh +++ b/src/powerbi-visuals-tools/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/prettier/devcontainer-feature.json b/src/prettier/devcontainer-feature.json index 321bb266b..8f878f2dd 100644 --- a/src/prettier/devcontainer-feature.json +++ b/src/prettier/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "prettier", - "version": "1.0.0", + "version": "1.0.1", "name": "Prettier (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/prettier", "description": "Prettier is an opinionated code formatter.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/prettier/install.sh b/src/prettier/install.sh index 1b3b0a434..e0216f623 100755 --- a/src/prettier/install.sh +++ b/src/prettier/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/prettier/library_scripts.sh b/src/prettier/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/prettier/library_scripts.sh +++ b/src/prettier/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/prisma/devcontainer-feature.json b/src/prisma/devcontainer-feature.json index 73ef53ca0..d6581d7a6 100644 --- a/src/prisma/devcontainer-feature.json +++ b/src/prisma/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "prisma", - "version": "2.0.14", + "version": "2.0.15", "name": "Prisma CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/prisma", "description": "Prisma is a next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/prisma/install.sh b/src/prisma/install.sh index d06669d0e..64c1be175 100755 --- a/src/prisma/install.sh +++ b/src/prisma/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/prisma/library_scripts.sh b/src/prisma/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/prisma/library_scripts.sh +++ b/src/prisma/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/projen/devcontainer-feature.json b/src/projen/devcontainer-feature.json index b6f945f2e..4187c143c 100644 --- a/src/projen/devcontainer-feature.json +++ b/src/projen/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "projen", - "version": "1.0.1", + "version": "1.0.2", "name": "projen (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/projen", "description": "projen synthesizes project configuration files such as package.json, tsconfig.json, .gitignore, GitHub Workflows, eslint, jest, etc from a well-typed definition written in JavaScript.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/projen/install.sh b/src/projen/install.sh index aaff0321e..798eb37db 100755 --- a/src/projen/install.sh +++ b/src/projen/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/projen/library_scripts.sh b/src/projen/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/projen/library_scripts.sh +++ b/src/projen/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/quasar-cli/devcontainer-feature.json b/src/quasar-cli/devcontainer-feature.json index a037585ed..c1b7889b0 100644 --- a/src/quasar-cli/devcontainer-feature.json +++ b/src/quasar-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "quasar-cli", - "version": "2.0.14", + "version": "2.0.15", "name": "Quasar CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/quasar-cli", "description": "Quasar is an MIT licensed open-source Vue.js based framework, which allows you as a web developer to quickly create responsive websites/apps in many flavours.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/quasar-cli/install.sh b/src/quasar-cli/install.sh index 16dedbe8a..7c918a79a 100755 --- a/src/quasar-cli/install.sh +++ b/src/quasar-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/quasar-cli/library_scripts.sh b/src/quasar-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/quasar-cli/library_scripts.sh +++ b/src/quasar-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/renovate-cli/devcontainer-feature.json b/src/renovate-cli/devcontainer-feature.json index 7dc8510d4..c63e610b5 100644 --- a/src/renovate-cli/devcontainer-feature.json +++ b/src/renovate-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "renovate-cli", - "version": "2.0.14", + "version": "2.0.15", "name": "Renovate CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/renovate-cli", "description": "Renovate is a universal dependency update tool. Multi-platform and multi-language.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/renovate-cli/install.sh b/src/renovate-cli/install.sh index c4dd17cae..696aeb687 100755 --- a/src/renovate-cli/install.sh +++ b/src/renovate-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/renovate-cli/library_scripts.sh b/src/renovate-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/renovate-cli/library_scripts.sh +++ b/src/renovate-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/rollup/devcontainer-feature.json b/src/rollup/devcontainer-feature.json index 710ff60d4..fec2f21c7 100644 --- a/src/rollup/devcontainer-feature.json +++ b/src/rollup/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "rollup", - "version": "2.0.14", + "version": "2.0.15", "name": "rollup.js (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/rollup", "description": "Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/rollup/install.sh b/src/rollup/install.sh index 438f6c147..e03daa749 100755 --- a/src/rollup/install.sh +++ b/src/rollup/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/rollup/library_scripts.sh b/src/rollup/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/rollup/library_scripts.sh +++ b/src/rollup/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/salesforce-cli/devcontainer-feature.json b/src/salesforce-cli/devcontainer-feature.json index 0cd7898c9..53624f906 100644 --- a/src/salesforce-cli/devcontainer-feature.json +++ b/src/salesforce-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "salesforce-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Salesforce CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/salesforce-cli", "description": "The Salesforce CLI is a powerful command line interface that simplifies development and build automation when working with your Salesforce org.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/salesforce-cli/install.sh b/src/salesforce-cli/install.sh index 7d0532ff5..65bbd9501 100755 --- a/src/salesforce-cli/install.sh +++ b/src/salesforce-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/salesforce-cli/library_scripts.sh b/src/salesforce-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/salesforce-cli/library_scripts.sh +++ b/src/salesforce-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/salesforce-sfdx/devcontainer-feature.json b/src/salesforce-sfdx/devcontainer-feature.json index a1bf8f7b5..f7cc5cbf3 100644 --- a/src/salesforce-sfdx/devcontainer-feature.json +++ b/src/salesforce-sfdx/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "salesforce-sfdx", - "version": "1.0.1", + "version": "1.0.2", "name": "Salesforce sfdx (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/salesforce-sfdx", "description": "sfdx provide you with the ability to develop and test your apps more easily on Salesforce Platform.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/salesforce-sfdx/install.sh b/src/salesforce-sfdx/install.sh index 40433e1db..18b2318b4 100755 --- a/src/salesforce-sfdx/install.sh +++ b/src/salesforce-sfdx/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/salesforce-sfdx/library_scripts.sh b/src/salesforce-sfdx/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/salesforce-sfdx/library_scripts.sh +++ b/src/salesforce-sfdx/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/sanity-cli/devcontainer-feature.json b/src/sanity-cli/devcontainer-feature.json index 9f9dd26de..b5a6fadbe 100644 --- a/src/sanity-cli/devcontainer-feature.json +++ b/src/sanity-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "sanity-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Sanity.io CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/sanity-cli", "description": "The sanity Command Line Interface (CLI) is a collection of tools for managing, developing, debugging, and deploying your Sanity Studio projects.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/sanity-cli/install.sh b/src/sanity-cli/install.sh index 707c1d760..b62d014d8 100755 --- a/src/sanity-cli/install.sh +++ b/src/sanity-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/sanity-cli/library_scripts.sh b/src/sanity-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/sanity-cli/library_scripts.sh +++ b/src/sanity-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/serverless/devcontainer-feature.json b/src/serverless/devcontainer-feature.json index a33a674d0..db2616af4 100644 --- a/src/serverless/devcontainer-feature.json +++ b/src/serverless/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "serverless", - "version": "2.0.14", + "version": "2.0.15", "name": "Serverless Framework (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/serverless", "description": "Serverless Framework is a widely used open-source IaC tool that allows you to build, and deploy serverless applications on multiple cloud providers.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/serverless/install.sh b/src/serverless/install.sh index 055745b40..301817a51 100755 --- a/src/serverless/install.sh +++ b/src/serverless/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/serverless/library_scripts.sh b/src/serverless/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/serverless/library_scripts.sh +++ b/src/serverless/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/shopify-cli/devcontainer-feature.json b/src/shopify-cli/devcontainer-feature.json index 2e153390f..0ff8ea43c 100644 --- a/src/shopify-cli/devcontainer-feature.json +++ b/src/shopify-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "shopify-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Shopify CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/shopify-cli", "description": "Shopify CLI is a command-line interface tool that helps you build Shopify apps and themes. It quickly generates Shopify apps, themes, and custom storefronts. You can also use it to automate many common development tasks.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/shopify-cli/install.sh b/src/shopify-cli/install.sh index 3ca1c418d..9451d8d76 100755 --- a/src/shopify-cli/install.sh +++ b/src/shopify-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/shopify-cli/library_scripts.sh b/src/shopify-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/shopify-cli/library_scripts.sh +++ b/src/shopify-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/snyk-cli/devcontainer-feature.json b/src/snyk-cli/devcontainer-feature.json index b1d893257..4b9a5314f 100644 --- a/src/snyk-cli/devcontainer-feature.json +++ b/src/snyk-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "snyk-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Snyk CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/snyk-cli", "description": "Snyk CLI scans and monitors your projects for security vulnerabilities.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/snyk-cli/install.sh b/src/snyk-cli/install.sh index 4c1157cef..8253b62bc 100755 --- a/src/snyk-cli/install.sh +++ b/src/snyk-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/snyk-cli/library_scripts.sh b/src/snyk-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/snyk-cli/library_scripts.sh +++ b/src/snyk-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/squarespace-server/devcontainer-feature.json b/src/squarespace-server/devcontainer-feature.json index 99bca5472..cb9dc7fbc 100644 --- a/src/squarespace-server/devcontainer-feature.json +++ b/src/squarespace-server/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "squarespace-server", - "version": "1.0.1", + "version": "1.0.2", "name": "Squarespace Local Development Server (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/squarespace-server", "description": "The Squarespace local development server is a command line tool that sets up a test server on your computer, allowing you to see changes to your template before making them live", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/squarespace-server/install.sh b/src/squarespace-server/install.sh index 968733c00..6f3acd644 100755 --- a/src/squarespace-server/install.sh +++ b/src/squarespace-server/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/squarespace-server/library_scripts.sh b/src/squarespace-server/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/squarespace-server/library_scripts.sh +++ b/src/squarespace-server/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/surge-cli/devcontainer-feature.json b/src/surge-cli/devcontainer-feature.json index 46ab4e3d7..96345ca09 100644 --- a/src/surge-cli/devcontainer-feature.json +++ b/src/surge-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "surge-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Surge CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/surge-cli", "description": "Publish HTML, CSS, and JS for free, without leaving the command line.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/surge-cli/install.sh b/src/surge-cli/install.sh index 9813cd8a0..0f885a9b9 100755 --- a/src/surge-cli/install.sh +++ b/src/surge-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/surge-cli/library_scripts.sh b/src/surge-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/surge-cli/library_scripts.sh +++ b/src/surge-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/tfcdk-cli/devcontainer-feature.json b/src/tfcdk-cli/devcontainer-feature.json index 6a9406fcb..966d15e99 100644 --- a/src/tfcdk-cli/devcontainer-feature.json +++ b/src/tfcdk-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "tfcdk-cli", - "version": "1.0.2", + "version": "1.0.3", "name": "Terraform CDK CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/tfcdk-cli", "description": "Cloud Development Kit for Terraform (CDKTF) allows you to use familiar programming languages to define and provision infrastructure. This gives you access to the entire Terraform ecosystem without learning HashiCorp Configuration Language (HCL) and lets you leverage the power of your existing toolchain for testing, dependency management, etc.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/tfcdk-cli/install.sh b/src/tfcdk-cli/install.sh index 015c0b42f..21d71193d 100755 --- a/src/tfcdk-cli/install.sh +++ b/src/tfcdk-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/tfcdk-cli/library_scripts.sh b/src/tfcdk-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/tfcdk-cli/library_scripts.sh +++ b/src/tfcdk-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/tldr/devcontainer-feature.json b/src/tldr/devcontainer-feature.json index a32a871f6..6b5d46671 100644 --- a/src/tldr/devcontainer-feature.json +++ b/src/tldr/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "tldr", - "version": "2.0.14", + "version": "2.0.15", "name": "tldr (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/tldr", "description": "The tldr pages are a community effort to simplify the beloved man pages with practical examples.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/tldr/install.sh b/src/tldr/install.sh index 39774249b..39ad2d5d4 100755 --- a/src/tldr/install.sh +++ b/src/tldr/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/tldr/library_scripts.sh b/src/tldr/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/tldr/library_scripts.sh +++ b/src/tldr/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/tooljet-cli/devcontainer-feature.json b/src/tooljet-cli/devcontainer-feature.json index a53b113b2..f33ba6c6c 100644 --- a/src/tooljet-cli/devcontainer-feature.json +++ b/src/tooljet-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "tooljet-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "ToolJet CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/tooljet-cli", "description": "ToolJet is an open-source low-code framework to build and deploy internal tools quickly with minimal engineering effort.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/tooljet-cli/install.sh b/src/tooljet-cli/install.sh index d2eec21d8..46c85e47d 100755 --- a/src/tooljet-cli/install.sh +++ b/src/tooljet-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/tooljet-cli/library_scripts.sh b/src/tooljet-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/tooljet-cli/library_scripts.sh +++ b/src/tooljet-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/trello-cli/devcontainer-feature.json b/src/trello-cli/devcontainer-feature.json index 3d254f840..f3b09d893 100644 --- a/src/trello-cli/devcontainer-feature.json +++ b/src/trello-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "trello-cli", - "version": "1.0.2", + "version": "1.0.3", "name": "Trello CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/trello-cli", "description": "trello-cli is a CLI tool for Trello. Makes sense, right?", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/trello-cli/install.sh b/src/trello-cli/install.sh index 028f4e515..1e8ce6bc7 100755 --- a/src/trello-cli/install.sh +++ b/src/trello-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/trello-cli/library_scripts.sh b/src/trello-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/trello-cli/library_scripts.sh +++ b/src/trello-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/truffle/devcontainer-feature.json b/src/truffle/devcontainer-feature.json index ab3aec5ff..9c39244d7 100644 --- a/src/truffle/devcontainer-feature.json +++ b/src/truffle/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "truffle", - "version": "1.0.1", + "version": "1.0.2", "name": "Truffle (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/truffle", "description": "Truffle is a development environment, testing framework, and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/truffle/install.sh b/src/truffle/install.sh index 7d21022b7..037971136 100755 --- a/src/truffle/install.sh +++ b/src/truffle/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/truffle/library_scripts.sh b/src/truffle/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/truffle/library_scripts.sh +++ b/src/truffle/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/ts-node/devcontainer-feature.json b/src/ts-node/devcontainer-feature.json index c504c3a40..c34d85cfd 100644 --- a/src/ts-node/devcontainer-feature.json +++ b/src/ts-node/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "ts-node", - "version": "1.0.0", + "version": "1.0.1", "name": "ts-node (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/ts-node", "description": "ts-node is a TypeScript execution engine and REPL for Node.js. It JIT transforms TypeScript into JavaScript, enabling you to directly execute TypeScript on Node.js without precompiling. ", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/ts-node/install.sh b/src/ts-node/install.sh index bc433f684..eeea8eb2a 100755 --- a/src/ts-node/install.sh +++ b/src/ts-node/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/ts-node/library_scripts.sh b/src/ts-node/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/ts-node/library_scripts.sh +++ b/src/ts-node/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/tsx/devcontainer-feature.json b/src/tsx/devcontainer-feature.json index 0c9a474ee..3916da702 100644 --- a/src/tsx/devcontainer-feature.json +++ b/src/tsx/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "tsx", - "version": "1.0.0", + "version": "1.0.1", "name": "tsx (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/tsx", "description": "tsx is a CLI command (alternative to node) for seamlessly running TypeScript & ESM, in both commonjs & module package types.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/tsx/install.sh b/src/tsx/install.sh index 1bc74bbd4..5b644dd34 100755 --- a/src/tsx/install.sh +++ b/src/tsx/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/tsx/library_scripts.sh b/src/tsx/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/tsx/library_scripts.sh +++ b/src/tsx/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/turborepo-npm/devcontainer-feature.json b/src/turborepo-npm/devcontainer-feature.json index 05033dfe1..822043ac2 100644 --- a/src/turborepo-npm/devcontainer-feature.json +++ b/src/turborepo-npm/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "turborepo-npm", - "version": "1.0.10", + "version": "1.0.11", "name": "Turborepo (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/turborepo-npm", "description": "Turborepo is a high-performance build system for JavaScript and TypeScript codebases.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/turborepo-npm/install.sh b/src/turborepo-npm/install.sh index 749a8faef..b2ca986ca 100755 --- a/src/turborepo-npm/install.sh +++ b/src/turborepo-npm/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/turborepo-npm/library_scripts.sh b/src/turborepo-npm/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/turborepo-npm/library_scripts.sh +++ b/src/turborepo-npm/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/typescript/devcontainer-feature.json b/src/typescript/devcontainer-feature.json index b9e331023..297cf22c1 100644 --- a/src/typescript/devcontainer-feature.json +++ b/src/typescript/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "typescript", - "version": "2.0.14", + "version": "2.0.15", "name": "TypeScript (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/typescript", "description": "TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/typescript/install.sh b/src/typescript/install.sh index 10ea7bec7..29f2a69e2 100755 --- a/src/typescript/install.sh +++ b/src/typescript/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/typescript/library_scripts.sh b/src/typescript/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/typescript/library_scripts.sh +++ b/src/typescript/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/vercel-cli/devcontainer-feature.json b/src/vercel-cli/devcontainer-feature.json index e8c927975..2aa4199fb 100644 --- a/src/vercel-cli/devcontainer-feature.json +++ b/src/vercel-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "vercel-cli", - "version": "1.0.2", + "version": "1.0.3", "name": "Vercel CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/vercel-cli", "description": "With Vercel CLI command-line interface (CLI) you can interact with the Vercel platform using a terminal, or through an automated system, enabling you to retrieve logs, manage certificates, replicate your deployment environment locally, manage Domain Name System (DNS) records, and more.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/vercel-cli/install.sh b/src/vercel-cli/install.sh index 9ea88db33..6ca3b9cd6 100755 --- a/src/vercel-cli/install.sh +++ b/src/vercel-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/vercel-cli/library_scripts.sh b/src/vercel-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/vercel-cli/library_scripts.sh +++ b/src/vercel-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/vercel-ncc/devcontainer-feature.json b/src/vercel-ncc/devcontainer-feature.json index 3f8d012fa..5b08ae414 100644 --- a/src/vercel-ncc/devcontainer-feature.json +++ b/src/vercel-ncc/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "vercel-ncc", - "version": "1.0.2", + "version": "1.0.3", "name": "ncc (by Vercel) (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/vercel-ncc", "description": "ncc is a simple CLI for compiling a Node.js module into a single file, together with all its dependencies, gcc-style.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/vercel-ncc/install.sh b/src/vercel-ncc/install.sh index d75d46c78..b25ae4e03 100755 --- a/src/vercel-ncc/install.sh +++ b/src/vercel-ncc/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/vercel-ncc/library_scripts.sh b/src/vercel-ncc/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/vercel-ncc/library_scripts.sh +++ b/src/vercel-ncc/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/vercel-pkg/devcontainer-feature.json b/src/vercel-pkg/devcontainer-feature.json index 04c9337ec..1757f6e4f 100644 --- a/src/vercel-pkg/devcontainer-feature.json +++ b/src/vercel-pkg/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "vercel-pkg", - "version": "1.0.2", + "version": "1.0.3", "name": "pkg (by Vercel) (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/vercel-pkg", "description": "This command line interface enables you to package your Node.js project into an executable that can be run even on devices without Node.js installed.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/vercel-pkg/install.sh b/src/vercel-pkg/install.sh index 5ad970e9d..3be83a273 100755 --- a/src/vercel-pkg/install.sh +++ b/src/vercel-pkg/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/vercel-pkg/library_scripts.sh b/src/vercel-pkg/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/vercel-pkg/library_scripts.sh +++ b/src/vercel-pkg/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/vercel-release/devcontainer-feature.json b/src/vercel-release/devcontainer-feature.json index 36f65ba7b..2aa158883 100644 --- a/src/vercel-release/devcontainer-feature.json +++ b/src/vercel-release/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "vercel-release", - "version": "1.0.2", + "version": "1.0.3", "name": "Release (by Vercel) (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/vercel-release", "description": "Release is a command line tool to automatically generate a new GitHub Release and populates it with the changes (commits) made since the last release.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/vercel-release/install.sh b/src/vercel-release/install.sh index 4b45896ba..67f5b4a87 100755 --- a/src/vercel-release/install.sh +++ b/src/vercel-release/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/vercel-release/library_scripts.sh b/src/vercel-release/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/vercel-release/library_scripts.sh +++ b/src/vercel-release/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/vercel-serve/devcontainer-feature.json b/src/vercel-serve/devcontainer-feature.json index 9ca5b400b..3db29a788 100644 --- a/src/vercel-serve/devcontainer-feature.json +++ b/src/vercel-serve/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "vercel-serve", - "version": "1.0.2", + "version": "1.0.3", "name": "serve (by Vercel) (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/vercel-serve", "description": "serve helps you serve a static site, single page application or just a static file (no matter if on your device or on the local network).", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/vercel-serve/install.sh b/src/vercel-serve/install.sh index c11885a05..68e07af2e 100755 --- a/src/vercel-serve/install.sh +++ b/src/vercel-serve/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/vercel-serve/library_scripts.sh b/src/vercel-serve/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/vercel-serve/library_scripts.sh +++ b/src/vercel-serve/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/vtop/devcontainer-feature.json b/src/vtop/devcontainer-feature.json index 654512230..d382c0c00 100644 --- a/src/vtop/devcontainer-feature.json +++ b/src/vtop/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "vtop", - "version": "2.0.14", + "version": "2.0.15", "name": "vtop (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/vtop", "description": "vtop is a graphical activity monitor for the command line.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/vtop/install.sh b/src/vtop/install.sh index ff43fe4f0..39584f69b 100755 --- a/src/vtop/install.sh +++ b/src/vtop/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/vtop/library_scripts.sh b/src/vtop/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/vtop/library_scripts.sh +++ b/src/vtop/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/vue-cli/devcontainer-feature.json b/src/vue-cli/devcontainer-feature.json index 48e2408f4..6b7adb421 100644 --- a/src/vue-cli/devcontainer-feature.json +++ b/src/vue-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "vue-cli", - "version": "2.0.14", + "version": "2.0.15", "name": "Vue CLI (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/vue-cli", "description": "Vue CLI is a full system for rapid Vue.js development.", @@ -15,6 +15,7 @@ } }, "installsAfter": [ - "ghcr.io/devcontainers-contrib/features/npm-package" + "ghcr.io/devcontainers-contrib/features/npm-package", + "ghcr.io/devcontainers/features/node" ] } \ No newline at end of file diff --git a/src/vue-cli/install.sh b/src/vue-cli/install.sh index 712edd5b6..d1a68ded7 100755 --- a/src/vue-cli/install.sh +++ b/src/vue-cli/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.39" +ensure_nanolayer nanolayer_location "v0.5.5" $nanolayer_location \ diff --git a/src/vue-cli/library_scripts.sh b/src/vue-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/vue-cli/library_scripts.sh +++ b/src/vue-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/test/corepack/scenarios.json b/test/corepack/scenarios.json new file mode 100644 index 000000000..b7e689470 --- /dev/null +++ b/test/corepack/scenarios.json @@ -0,0 +1,8 @@ +{ + "test": { + "image": "mcr.microsoft.com/devcontainers/base:debian", + "features": { + "corepack": {} + } + } +} \ No newline at end of file diff --git a/test/corepack/test.sh b/test/corepack/test.sh new file mode 100755 index 000000000..e2a079cb7 --- /dev/null +++ b/test/corepack/test.sh @@ -0,0 +1,9 @@ +#!/bin/bash -i + +set -e + +source dev-container-features-test-lib + +check "corepack --version" corepack --version + +reportResults diff --git a/test/tfcdk-cli/scenarios.json b/test/tfcdk-cli/scenarios.json index 631aa3d46..19a1e25cf 100644 --- a/test/tfcdk-cli/scenarios.json +++ b/test/tfcdk-cli/scenarios.json @@ -8,7 +8,9 @@ "test_specific_version": { "image": "mcr.microsoft.com/devcontainers/base:bullseye", "features": { - "tfcdk-cli": {"version": "0.17.0"} + "tfcdk-cli": { + "version": "0.17.0" + } } } } \ No newline at end of file diff --git a/test/tfcdk-cli/test_specific_version.sh b/test/tfcdk-cli/test_specific_version.sh index 7a16f6db8..64f65b3a3 100755 --- a/test/tfcdk-cli/test_specific_version.sh +++ b/test/tfcdk-cli/test_specific_version.sh @@ -4,6 +4,6 @@ set -e source dev-container-features-test-lib -check "cdktf --version" cdktf --version +check "cdktf --version | grep 0.17.0" cdktf --version | grep 0.17.0 reportResults