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

feat: Update schema to support variable autoupdate urls #5297

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

scowalt
Copy link

@scowalt scowalt commented Dec 17, 2022

Description

Before, any autoupdate url had to take the form of a well-formed URI. However, this would throw an error for otherwise-functional urls using variables from checkver that didn't match this schema. Example: (note how $matchUrl will be a valid URL when evaluated, but as a literal string it is not a valid URL)

    "checkver": {
        "url": "https://www.cyberpowersystems.com/product/software/power-panel-personal/powerpanel-personal-windows/",
        "regex": "\"(?<url>https://[^\"]*v(?<version>[^\"]*)\\.exe)\""
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "$matchUrl"
            }
        }
    }

Motivation and Context

Closes #5296
Closes #5158 (probably a dupe, but not 100% sure)

How Has This Been Tested?

I have a .json file that shows a warning in VSCode when pointing to the old schema. I pointed my VSCode to the new schema by modifying .vscode/settings.json . The error on my url went away. No new warnings showed up on my other existing packages.

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

@@ -13,6 +13,10 @@

- **bucket:** Skip manifest validation if no manifest changes ([#5270](https://github.com/ScoopInstaller/Scoop/issues/5270))

### Builds

- **schema:** 'autoupdate' 'url' can now be any string ([#5296](https://github.com/ScoopInstaller/Scoop/issues/5296))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't quite sure how to describe this. Feel free to modify!

@scowalt scowalt marked this pull request as ready for review December 17, 2022 23:35
@scowalt
Copy link
Author

scowalt commented Dec 17, 2022

All of the tests still pass, and the documentation I could find seems fine as-is

@brian6932
Copy link

brian6932 commented Dec 18, 2022

@scowalt Feel free to add #5158 to Closes as well 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants