From c56ef71734e21389055dd6e3f252925231812f6d Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 19 Dec 2022 17:13:59 -0500 Subject: [PATCH] missed shell scripts --- node_base/build-npm-package.sh | 22 ++++++++++++++++++++++ node_base/entrypoint.sh | 2 ++ 2 files changed, 24 insertions(+) create mode 100755 node_base/build-npm-package.sh create mode 100755 node_base/entrypoint.sh diff --git a/node_base/build-npm-package.sh b/node_base/build-npm-package.sh new file mode 100755 index 0000000..cc2eeb2 --- /dev/null +++ b/node_base/build-npm-package.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Usage: build-npm-package.sh +# Note: supply the registry auth token in NPM_AUTH_TOKEN +if [ -n "$CERC_ENABLE_SCRIPT_DEBUG" ]; then + set -x +fi +if [[ $# -ne 2 ]]; then + echo "Illegal number of parameters" >&2 + exit 1 +fi +if [[ -z "${NPM_AUTH_TOKEN}" ]]; then + echo "NPM_AUTH_TOKEN is not set" >&2 + exit 1 +fi +local_npm_registry_url=$1 +package_publish_version=$2 +npm config set @cerc-io:registry ${local_npm_registry_url} +npm config set -- ${local_npm_registry_url}:_authToken ${NPM_AUTH_TOKEN} +echo "Build and publish version ${package_publish_version}" +yarn install +yarn build +yarn publish --non-interactive --new-version ${package_publish_version} --no-git-tag-version diff --git a/node_base/entrypoint.sh b/node_base/entrypoint.sh new file mode 100755 index 0000000..311cb8c --- /dev/null +++ b/node_base/entrypoint.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec "$@"