Created
November 29, 2023 01:39
-
-
Save jaalorsa517/678d03c7dc80f08ef521e532057d71c1 to your computer and use it in GitHub Desktop.
Deploy libreria
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ruta de la biblioteca a construir | |
libraryPath="" | |
# Ruta del proyecto objetivo | |
projectTarget="" | |
# Ruta de despliegue | |
deploy="" | |
# Nombre del artefacto generado con npm pack | |
artifact="" | |
# Espacio de nombres de la biblioteca | |
lybraryNamespace="" | |
echo "[INFO] Building library" | |
cd $libraryPath | |
npm run build | |
echo "[INFO] Creating artifact" | |
npm pack | |
echo "[INFO] Deploying artifact" | |
mv $artifact $deploy | |
echo "[INFO] Installing artifact" | |
cd $projectTarget | |
rm -rf node_modules/$lybraryNamespace | |
npm i $deploy/$artifact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment