mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 13:02:50 +00:00
Create create-npmrc.sh
This commit is contained in:
19
scripts/deploy/create-npmrc.sh
Normal file
19
scripts/deploy/create-npmrc.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Create .npmrc_temp and .npmrc for Docker BuildKit / compose secrets.
|
||||
# Requires NPM_TOKEN in the environment.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [[ -z "${NPM_TOKEN:-}" ]]; then
|
||||
echo "NPM_TOKEN is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat <<EOF > .npmrc_temp
|
||||
@tria-plc:registry=https://npm.pkg.github.com
|
||||
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
|
||||
always-auth=true
|
||||
EOF
|
||||
|
||||
cp .npmrc_temp .npmrc
|
||||
echo "Created .npmrc_temp and .npmrc for private @tria-plc packages"
|
||||
Reference in New Issue
Block a user