forked from cerc-io/stack-orchestrator
Brand token env var
This commit is contained in:
1 parent
ee1ecbd217
commit
073d94e288
4 files changed
+14
-17
No files matched your search
@@ -12,6 +12,6 @@ it is possible to build packages manually by invoking `docker run` , for example
|
||||
```
|
||||
$ docker run --rm -it --add-host host.docker.internal:host-gateway \
|
||||
-v ${HOME}/cerc/laconic-registry-cli:/workspace cerc/builder-js \
|
||||
sh -c 'cd /workspace && NPM_AUTH_TOKEN=6613572a28ebebaee20ccd90064251fa8c2b94f6 \
|
||||
sh -c 'cd /workspace && CERC_NPM_AUTH_TOKEN=6613572a28ebebaee20ccd90064251fa8c2b94f6 \
|
||||
build-npm-package-local-dependencies.sh http://host.docker.internal:3000/api/packages/cerc-io/npm/ 0.1.8'
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Usage: build-npm-package.sh <registry-url> <publish-with-this-version>
|
||||
# Note: supply the registry auth token in NPM_AUTH_TOKEN
|
||||
# Note: supply the registry auth token in CERC_NPM_AUTH_TOKEN
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
@@ -8,15 +8,15 @@ 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
|
||||
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 ${NPM_AUTH_TOKEN}
|
||||
npm config set -- ${local_npm_registry_url}:_authToken ${CERC_NPM_AUTH_TOKEN}
|
||||
echo "Build and publish version ${package_publish_version}"
|
||||
yarn install
|
||||
yarn build
|
||||
|
||||
Reference in new issue
Block a user