Skip to content

Commit

Permalink
Merge pull request #12 from VincentHardouin/fix-character-in-release-…
Browse files Browse the repository at this point in the history
…name
  • Loading branch information
VincentHardouin authored Nov 11, 2022
2 parents 40f779c + 26d0f00 commit f44dd35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions npm-bump
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function verlt() { ! verlte "$2" "$1"; }

function get_versions() {
unset versions
read -u 7 -r -d '\n' -a versions 7< <( npm view "$1" versions --json | awk -F "[,\n]" '!/\[|beta|alpha|rc|unstable|\]/ { gsub(/"/, "", $1); print $1}' | sort -V --reverse )
read -u 7 -r -d '\n' -a versions 7< <( npm view "$1" versions --json | awk -F "[,\n]" '!/\[|beta|alpha|rc|unstable|canary|\]/ { gsub(/"/, "", $1); print $1}' | sort -V --reverse )
}

function filter_new_versions() {
Expand All @@ -118,7 +118,7 @@ function get_newest_versions() {
}

function install_version() {
current_version=$(npm list --depth=0 | grep "$1@" | grep -E -o "(\d*.){3}$")
current_version=$(npm list --depth=0 | grep "$1@" | grep -E -o "@.*$" | sed "s/@//")
echo "Try to bump $1 from $current_version to $2"

if [ -n "${command}" ]; then
Expand Down Expand Up @@ -220,4 +220,4 @@ function show_result() {
handle_arguments "$@"
npm_files_exist
bump_version
show_result
show_result

0 comments on commit f44dd35

Please sign in to comment.