Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

checkver matches not available when using scoop install app@version #5985

Open
simonmcconnell opened this issue May 22, 2024 · 1 comment
Open

Comments

@simonmcconnell
Copy link
Sponsor

simonmcconnell commented May 22, 2024

Installing a specific version scoop install elixir@main using my attempt at updating the manifest fails because the substitutions are passed as an empty hashmap.

Installing a specific version scoop install elixir@main using the current manifest in the main bucket fails because it tries to download vmain.zip instead of main.zip.

Invoke-AutoUpdate $app "$(Convert-Path (usermanifestsdir))\$app.json" $manifest $version $(@{ })

What I want to be able to do is install main*.zip as well as v<version>.zip but it is not as easy as I was hoping.

I attempted to use the below manifest but it does not like it when you specify a version to install.

{
    "version": "1.16.2",
    "description": "A dynamic and functional programming language designed for building scalable and maintainable applications.",
    "homepage": "https://elixir-lang.org/",
    "license": "Apache-2.0",
    "suggest": {
        "Erlang compiler": "erlang"
    },
    "url": "https://builds.hex.pm/builds/elixir/v1.16.2.zip",
    "hash": "0161578ce5988e286eafd2ee1b6b1999ac69c6a1b226209e332b9e9db1522dcb",
    "env_add_path": "bin",
    "checkver": {
        "url": "https://github.com/elixir-lang/elixir/releases/latest",
        "regex": "(?<vversion>[v|V]{1}(?<version>\\d\\.\\d+\\.\\d+))"
    },
    "autoupdate": {
        "url": "https://builds.hex.pm/builds/elixir/$matchVversion.zip",
        "hash": {
            "url": "https://builds.hex.pm/builds/elixir/builds.txt",
            "regex": "$version [a-zA-Z0-9]+ \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z $sha256"
        }
    }
}

This is the current manifest in the main bucket:

{
    "version": "1.16.3",
    "description": "A dynamic and functional programming language designed for building scalable and maintainable applications.",
    "homepage": "https://elixir-lang.org/",
    "license": "Apache-2.0",
    "suggest": {
        "Erlang compiler": "erlang"
    },
    "url": "https://builds.hex.pm/builds/elixir/v1.16.3.zip",
    "hash": "d01d22ef11651cf933747f9ceb401f7ef7d932d46e64dc7970713fa9a8063720",
    "env_add_path": "bin",
    "checkver": {
        "github": "https://github.com/elixir-lang/elixir"
    },
    "autoupdate": {
        "url": "https://builds.hex.pm/builds/elixir/v$version.zip",
        "hash": {
            "url": "https://builds.hex.pm/builds/elixir/builds.txt",
            "regex": "$version [a-zA-Z0-9]+ \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z $sha256"
        }
    }
}
@simonmcconnell
Copy link
Sponsor Author

worst case, the wiki should be updated to inform you that they're not available when installing specific versions.

https://github.com/ScoopInstaller/Scoop/wiki/App-Manifest-Autoupdate#captured-variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant