Skip to content

Commit

Permalink
Rename unstable versions to legacy versions.
Browse files Browse the repository at this point in the history
Signed-off-by: ghosind <[email protected]>
  • Loading branch information
ghosind committed Dec 25, 2024
1 parent 27caab8 commit 03578a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions dvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1534,16 +1534,18 @@ export DVM_VERSION="v0.9.1"
dvm_get_remote_versions() {
local last_version
local cache_file
local unstable_versions
local legacy_versions

if [ -f "$DVM_DIR/unstable-versions" ] && dvm_get_versions_from_deno_versions_json
# deno.com/versions.json does not provide the versions before v1.0.0, so we put these version
# into the static legacy versions file.
if [ -f "$DVM_DIR/legacy-versions" ] && dvm_get_versions_from_deno_versions_json
then
unstable_versions=$(cat "$DVM_DIR/unstable-versions")
DVM_REMOTE_VERSIONS=$(echo -e "$unstable_versions\n$DVM_REMOTE_VERSIONS")
legacy_versions=$(cat "$DVM_DIR/legacy-versions")
DVM_REMOTE_VERSIONS=$(echo -e "$legacy_versions\n$DVM_REMOTE_VERSIONS")
return
fi

dvm_debug "Failed to get unstable versions from deno.com/versions.json, fallback to GitHub API"
dvm_debug "Failed to get Deno versions from deno.com/versions.json, fallback to GitHub API"

cache_file="$DVM_DIR/cache/remote-versions"

Expand Down
File renamed without changes.

0 comments on commit 03578a0

Please sign in to comment.