mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
update move and add script
This commit is contained in:
@@ -7,9 +7,11 @@ eval SAVE_OPT=false
|
||||
eval SAVE_DEV_OPT=false
|
||||
|
||||
show_help() {
|
||||
echo "Usage: npm-clean.sh"
|
||||
echo "Usage: npm-add-pkg.sh"
|
||||
echo ""
|
||||
echo "--save"
|
||||
echo "--save-dev"
|
||||
echo "--save-exact"
|
||||
}
|
||||
|
||||
eval projects=( "ng2-activiti-diagrams"
|
||||
@@ -40,11 +42,17 @@ save_dev(){
|
||||
SAVE_DEV_OPT=true
|
||||
}
|
||||
|
||||
save_dev(){
|
||||
NAME_PKG=$1
|
||||
SAVE_EXACT=true
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
--save) save $2; shift 2;;
|
||||
--save-dev) save_dev $2; shift 2;;
|
||||
--save-exact) save_exact $2; shift 2;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
|
||||
esac
|
||||
done
|
||||
@@ -62,6 +70,11 @@ do
|
||||
echo "====== npm install --save-dev ${NAME_PKG} ====="
|
||||
npm install --save-dev ${NAME_PKG}
|
||||
fi
|
||||
|
||||
if $SAVE_EXACT == true; then
|
||||
echo "====== npm install ----save-exact${NAME_PKG} ====="
|
||||
npm install --save-exact ${NAME_PKG}
|
||||
fi
|
||||
done
|
||||
|
||||
cd "$DIR/../demo-shell-ng2"
|
||||
@@ -73,6 +86,10 @@ if $SAVE_DEV_OPT == true; then
|
||||
npm install --save-dev ${NAME_PKG}
|
||||
fi
|
||||
|
||||
if $SAVE_EXACT == true; then
|
||||
npm install --save-exact ${NAME_PKG}
|
||||
fi
|
||||
|
||||
|
||||
cd "$DIR/../ng2-components"
|
||||
|
||||
@@ -84,3 +101,6 @@ if $SAVE_DEV_OPT == true; then
|
||||
npm install --save-dev ${NAME_PKG}
|
||||
fi
|
||||
|
||||
if $SAVE_EXACT == true; then
|
||||
npm install --save-exact ${NAME_PKG}
|
||||
fi
|
||||
|
50
scripts/npm-move-tag.sh
Normal file
50
scripts/npm-move-tag.sh
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
show_help() {
|
||||
echo "Usage: npm-clean.sh"
|
||||
echo ""
|
||||
echo "-v version package to apply new tag"
|
||||
echo "-t new tag name to add"
|
||||
}
|
||||
|
||||
new_tag(){
|
||||
eval TAG=$1
|
||||
}
|
||||
|
||||
package_version(){
|
||||
eval PACKAGE_VERSION=$1
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
-t|--tag) new_tag $2; shift 2;;
|
||||
-v) package_version $2; shift 2;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
|
||||
esac
|
||||
done
|
||||
|
||||
for PACKAGE in \
|
||||
ng2-alfresco-core \
|
||||
ng2-alfresco-datatable \
|
||||
ng2-activiti-diagrams \
|
||||
ng2-activiti-analytics \
|
||||
ng2-activiti-form \
|
||||
ng2-activiti-tasklist \
|
||||
ng2-activiti-processlist \
|
||||
ng2-alfresco-documentlist \
|
||||
ng2-alfresco-login \
|
||||
ng2-alfresco-search \
|
||||
ng2-alfresco-tag \
|
||||
ng2-alfresco-social \
|
||||
ng2-alfresco-upload \
|
||||
ng2-alfresco-viewer \
|
||||
ng2-alfresco-webscript \
|
||||
ng2-alfresco-userinfo
|
||||
do
|
||||
echo "====== Move ${PACKAGE}@${PACKAGE_VERSION} to tag ${TAG}===== "
|
||||
echo "====== command npm dist-tag add ${PACKAGE}@${PACKAGE_VERSION} ${TAG}===== "
|
||||
npm dist-tag add ${PACKAGE}@${PACKAGE_VERSION} ${TAG}
|
||||
done
|
Reference in New Issue
Block a user