switch between arti and default
This commit is contained in:
42
frontend/switch-registry.sh
Normal file
42
frontend/switch-registry.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script to switch between npm registries
|
||||
# Usage: ./switch-registry.sh [public|artifactory]
|
||||
|
||||
set -e
|
||||
|
||||
REGISTRY_TYPE=${1:-public}
|
||||
|
||||
case $REGISTRY_TYPE in
|
||||
public)
|
||||
echo "Switching to public npm registry..."
|
||||
cp .npmrc.public .npmrc
|
||||
echo "✓ Now using registry.npmjs.org"
|
||||
echo ""
|
||||
echo "To install dependencies:"
|
||||
echo " npm ci --force"
|
||||
;;
|
||||
artifactory)
|
||||
echo "Switching to Artifactory registry..."
|
||||
cp .npmrc.artifactory .npmrc
|
||||
echo "✓ Now using Artifactory registry"
|
||||
echo ""
|
||||
echo "Make sure to set environment variables if authentication is required:"
|
||||
echo " export ARTIFACTORY_AUTH_TOKEN=your_token"
|
||||
echo ""
|
||||
echo "To install dependencies:"
|
||||
echo " npm ci --force"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [public|artifactory]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " public - Use registry.npmjs.org (default)"
|
||||
echo " artifactory - Use Artifactory npm registry"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo "Current .npmrc contents:"
|
||||
cat .npmrc
|
||||
Reference in New Issue
Block a user