Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rename unstable versions to legacy versions #58

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading