diff --git a/app/build_npms.py b/app/build_npms.py index 812fb5c6..4dbed550 100644 --- a/app/build_npms.py +++ b/app/build_npms.py @@ -60,7 +60,8 @@ def command(ctx, include, exclude): print(f"Building: {package}") repo_dir = package repo_full_path = os.path.join(dev_root_path, repo_dir) - build_command = ["sh", "-c", "cd /workspace && build-npm-package.sh http://host.docker.internal:3000/api/packages/cerc-io/npm/ 1.0.15"] + # TODO: make the npm registry url configurable. + build_command = ["sh", "-c", "cd /workspace && build-npm-package-local-dependencies.sh http://host.docker.internal:3000/api/packages/cerc-io/npm/ 1.0.16"] if not dry_run: if verbose: print(f"Executing: {build_command}") diff --git a/container-build/cerc-builder-js/build-npm-package-local-dependencies.sh b/container-build/cerc-builder-js/build-npm-package-local-dependencies.sh index cb2b52a4..6449bb87 100755 --- a/container-build/cerc-builder-js/build-npm-package-local-dependencies.sh +++ b/container-build/cerc-builder-js/build-npm-package-local-dependencies.sh @@ -9,8 +9,8 @@ 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 +if [[ -z "${CERC_NPM_AUTH_TOKEN}" ]]; then + echo "CERC_NPM_AUTH_TOKEN is not set" >&2 exit 1 fi local_npm_registry_url=$1 @@ -19,7 +19,7 @@ package_publish_version=$2 npm_scope_for_local="@cerc-io" # We need to configure the local registry npm config set ${npm_scope_for_local}:registry ${local_npm_registry_url} -npm config set -- ${local_npm_registry_url}:_authToken ${NPM_AUTH_TOKEN} +npm config set -- ${local_npm_registry_url}:_authToken ${CERC_NPM_AUTH_TOKEN} # Find the set of dependencies from the specified scope mapfile -t dependencies_from_scope < <(cat package.json | jq -r '.dependencies | with_entries(if (.key|test("^'${npm_scope_for_local}'/.*$")) then ( {key: .key, value: .value } ) else empty end ) | keys[]') echo "Fixing up dependencies"