Default to from-repo package version

This commit is contained in:
David Boreham 2023-01-04 21:23:17 -07:00
parent 68c6eaf0b4
commit 765db5937d
3 changed files with 9 additions and 5 deletions

View File

@ -61,7 +61,7 @@ def command(ctx, include, exclude):
repo_dir = package
repo_full_path = os.path.join(dev_root_path, repo_dir)
# 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"]
build_command = ["sh", "-c", "cd /workspace && build-npm-package-local-dependencies.sh http://host.docker.internal:3000/api/packages/cerc-io/npm/"]
if not dry_run:
if verbose:
print(f"Executing: {build_command}")
@ -70,7 +70,7 @@ def command(ctx, include, exclude):
interactive=True,
tty=True,
user=f"{os.getuid()}:{os.getgid()}",
envs={"CERC_NPM_AUTH_TOKEN": os.environ["CERC_NPM_AUTH_TOKEN"]},
envs={"CERC_NPM_AUTH_TOKEN": os.environ["CERC_NPM_AUTH_TOKEN"], "CERC_SCRIPT_DEBUG": "true"},
add_hosts=[("host.docker.internal", "host-gateway")],
volumes=[(repo_full_path, "/workspace")],
command=build_command

View File

@ -5,7 +5,7 @@
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
if [[ $# -ne 2 ]]; then
if ! [[ $# -eq 1 || $# -eq 2 ]]; then
echo "Illegal number of parameters" >&2
exit 1
fi

View File

@ -4,7 +4,7 @@
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
if [[ $# -ne 2 ]]; then
if ! [[ $# -eq 1 || $# -eq 2 ]]; then
echo "Illegal number of parameters" >&2
exit 1
fi
@ -12,8 +12,12 @@ if [[ -z "${CERC_NPM_AUTH_TOKEN}" ]]; then
echo "CERC_NPM_AUTH_TOKEN is not set" >&2
exit 1
fi
if [[ $# -eq 2 ]]; then
package_publish_version=$2
else
package_publish_version=$( cat package.json | jq -r .version )
fi
local_npm_registry_url=$1
package_publish_version=$2
npm config set @lirewine:registry ${local_npm_registry_url}
npm config set @cerc-io:registry ${local_npm_registry_url}
npm config set -- ${local_npm_registry_url}:_authToken ${CERC_NPM_AUTH_TOKEN}