File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -7,29 +7,8 @@ RED='\033[0;31m'
77BOLD=' \033[1m'
88NC=' \033[0m'
99
10- # Función para obtener la versión de npm
11- get_npm_version () {
12- npm view netepscript version 2> /dev/null
13- }
14-
15- # Función para obtener la versión de GitHub
16- get_github_version () {
17- curl -s https://github.com/Synergy2Devs/netepScript/blob/main/package.json | grep -oP ' "version": "\K[^"]+'
18- }
19-
2010# Intenta obtener la versión de npm
21- VERSION=$( get_npm_version)
22-
23- # Si no se puede obtener de npm, intenta obtenerla de GitHub
24- if [ -z " $VERSION " ]; then
25- VERSION=$( get_github_version)
26- fi
27-
28-
29- if [ -z " $VERSION " ]; then
30- VERSION=" desconocida"
31- echo -e " ${YELLOW} Advertencia: No se pudo determinar la versión de netepscript${NC} "
32- fi
11+ VERSION=$( npm view netepscript version 2> /dev/null)
3312
3413echo -e " ${GREEN} =========================================================${NC} "
3514echo -e " ${BLUE} ${BOLD} netepScript v${VERSION}${NC} "
You can’t perform that action at this time.
0 commit comments