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

builds(checkver): Implement SourceForge checkver functionality #5113

Merged
merged 12 commits into from
Sep 26, 2022

Conversation

niheaven
Copy link
Member

@niheaven niheaven commented Aug 17, 2022

Description

SourceForge checkver based on @se35710's previous work.

The following description is copied from #4560 and updated

In it's most simple form:

    "checkver": "sourceforge",

This will find the project name from homepage, or if that fails, from the manifest name.

A more comples example:

    "checkver": {
        "sourceforge": {
            "project": "pmt",
            "path": "pngcrush-executables"
        }
    },

or simplified version (newly added, just likes github)

    "checkver": {
        "sourceforge": "pmt/pngcrush-executables"
    },

Here we provide the project name, and a path into the files section (to limit number of downloads). project is optional and only needed if homepage or manifest name is not equal to the SourceForge project name.

The default regex is (?!\.)([\d.]+)(?<=\d) and the actually used one is "CDATA\[/$path/.*?$sourceforgeRegex.*?\]".Replace('//', '/'). If regex or re in checkver is set, it is used as $sourceforgeRegex.

Motivation and Context

We have a lot of different approaches to SourceForge updates, this will help with maintaining those.

How Has This Been Tested?

I've copied some test manifests from #2455 and add more in ScoopInstaller/Tests#5

tests on  test-sf-checkver [?].\bin\checkver astyle -f
astyle: 3.1 (scoop version is 3.1)
Forcing autoupdate!
Autoupdating astyle
Found: sha1:5372ca57577f252cb6efdde12f889329786a72a2 using Sourceforge Mode
Writing updated astyle manifest

tests on  test-sf-checkver [?] took 6s.\bin\checkver binutils -f
binutils: 2.39 (scoop version is 2.39)
Forcing autoupdate!
Autoupdating binutils
Found: sha1:80177c93af07fb1ace1a9e7a6726d47f1430eab3 using Sourceforge Mode
Downloading libgcc-9.2.0-3-mingw32-dll-1.tar.xz to compute hashes!
libgcc-9.2.0-3-mingw32-dll-1.tar.xz (43.8 KB) [===============================================================] 100%
Computed hash: 27f7a72e1aa5d0bb894f84aa62da0200b3a4a334e85457bb1961fc341290f833
Writing updated binutils manifest

tests on  test-sf-checkver [?] took 11s.\bin\checkver blat -f
blat: 3.2.24 (scoop version is 3.2.24)
Forcing autoupdate!
Autoupdating blat
Found: sha1:a98f048900cea5a70e5ee4f39ad08f6d4f13eccc using Sourceforge Mode
Found: sha1:436c01bfa4dc14a255e63720d0745791bdd9910e using Sourceforge Mode
Writing updated blat manifest

tests on  test-sf-checkver [?] took 8s.\bin\checkver djvulibre -f
djvulibre: 3.5.28-4.12 (scoop version is 3.5.28-4.12)
Forcing autoupdate!
Autoupdating djvulibre
Found: sha1:acd91e73505f1d00835454ab6314a981cd849541 using Sourceforge Mode
Writing updated djvulibre manifest

tests on  test-sf-checkver [!?] took 8s.\bin\checkver editorconfig -f
editorconfig: 0.12.1 (scoop version is 0.12.1)
Forcing autoupdate!
Autoupdating editorconfig
Found: sha1:7c44b819690baec3de22edc0c9f7eb21dc0a7850 using Sourceforge Mode
Writing updated editorconfig manifest

tests on  test-sf-checkver [!?] took 6s.\bin\checkver graphicsmagick -f
graphicsmagick: 1.3.36 (scoop version is 1.3.36)
Forcing autoupdate!
Autoupdating graphicsmagick
Found: sha1:a87e26389d0b3d4ddbb6adde9018c0609376a836 using Sourceforge Mode
Found: sha1:6b6fff1319081890fb85530146c98e63f444d52c using Sourceforge Mode
Writing updated graphicsmagick manifest

tests on  test-sf-checkver [?] took 8s.\bin\checkver inadyn-mt -f
inadyn-mt: 02.28.10 (scoop version is 02.28.10)
Forcing autoupdate!
Autoupdating inadyn-mt
Found: sha1:176d47ceb2ddf854c3401fd0ae858d38245810a1 using Sourceforge Mode
Writing updated inadyn-mt manifest

tests on  test-sf-checkver [?] took 4s.\bin\checkver pngcrush -f
pngcrush: 1.8.11 (scoop version is 1.8.11)
Forcing autoupdate!
Autoupdating pngcrush
Found: sha1:ce02f50fa3d82f0d5464f28ac78d3ecee10c5f58 using Sourceforge Mode
Found: sha1:8980ee9b18c0545f61fc8b1156546b24ffa90db8 using Sourceforge Mode
Writing updated pngcrush manifest

tests on  test-sf-checkver [?] took 10s.\bin\checkver xmlstarlet -f
xmlstarlet: 1.6.1 (scoop version is 1.6.1)
Forcing autoupdate!
Autoupdating xmlstarlet
Found: sha1:cc5f5cd17a1f81740e5185a70408ffd6fa2f862d using Sourceforge Mode
Writing updated xmlstarlet manifest

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.

@niheaven
Copy link
Member Author

@se35710 Any problem?

Copy link
Contributor

@se35710 se35710 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Tested with some of the manifests in the original PR. Thank you!

@niheaven niheaven merged commit 04595b4 into develop Sep 26, 2022
@niheaven niheaven deleted the fix-sf-checkver branch September 26, 2022 11:56
pynappo pushed a commit to pynappo/Scoop that referenced this pull request Sep 29, 2022
…Installer#5113)

Co-authored-by: Mathias Hermansson <mathias.hermansson@se.ibm.com>
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.

2 participants