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'
7
7
BOLD=' \033[1m'
8
8
NC=' \033[0m'
9
9
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
-
20
10
# 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)
33
12
34
13
echo -e " ${GREEN} =========================================================${NC} "
35
14
echo -e " ${BLUE} ${BOLD} netepScript v${VERSION}${NC} "
You can’t perform that action at this time.
0 commit comments