Skip to content

freecad: Update to version 1.1.0, fix checkver & autoupdate#17488

Merged
z-Fng merged 2 commits into
ScoopInstaller:masterfrom
SorYoshino:freecad
Mar 29, 2026
Merged

freecad: Update to version 1.1.0, fix checkver & autoupdate#17488
z-Fng merged 2 commits into
ScoopInstaller:masterfrom
SorYoshino:freecad

Conversation

@SorYoshino

@SorYoshino SorYoshino commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates freecad to version 1.1.0, modernizes the license field, and implements a robust directory flattening logic in pre_install.

Changes

  • Update version to 1.1.0: Bump version and update hashes for the x64 architecture.
  • Modernize License: Update to LGPL-2.1-or-later and move to a structured object with a direct link to the license file.
  • Robust pre_install:
    • Replace the mv */* . command with a PowerShell while loop that automatically detects and flattens nested top-level directories (up to 5 levels).
    • This ensures successful installation even if the upstream ZIP structure changes or contains unexpected wrappers.
  • Enhance checkver:
    • Switch to the GitHub API with jsonpath to target .7z Windows assets.
    • Improve regex using named capture groups (tag and name) to handle both standard and "conda" naming conventions.
  • Refine autoupdate:
    • Integrate named groups ($matchTag, $matchName) for more reliable URL construction.

Notes

  • Upstream has moved to LGPL-2.1 for recent releases, which is reflected in the updated license field.

Testing

The test results are as follows:
┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ develop ≡]
└─> .\checkver.ps1 -App freecad -Dir 'D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket' -f
freecad: 1.1.0 (scoop version is 1.1.0)
Forcing autoupdate!
Autoupdating freecad
DEBUG[1774688065] [$updatedProperties] = [hash url] -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:500:5
DEBUG[1774688065] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:230:5
DEBUG[1774688065] $substitutions.$patchVersion                  0
DEBUG[1774688065] $substitutions.$url                           https://github.com/FreeCAD/FreeCAD/releases/download/1.1.0/FreeCAD_1.1.0-Windows-x86_64-py311.7z
DEBUG[1774688065] $substitutions.$urlNoExt                      https://github.com/FreeCAD/FreeCAD/releases/download/1.1.0/FreeCAD_1.1.0-Windows-x86_64-py311
DEBUG[1774688065] $substitutions.$matchName                     FreeCAD_1.1.0-Windows-x86_64-py311.7z
DEBUG[1774688065] $substitutions.$underscoreVersion             1_1_0
DEBUG[1774688065] $substitutions.$basename                      FreeCAD_1.1.0-Windows-x86_64-py311.7z
DEBUG[1774688065] $substitutions.$buildVersion
DEBUG[1774688065] $substitutions.$match1                        1.1.0
DEBUG[1774688065] $substitutions.$version                       1.1.0
DEBUG[1774688065] $substitutions.$majorVersion                  1
DEBUG[1774688065] $substitutions.$dotVersion                    1.1.0
DEBUG[1774688065] $substitutions.$basenameNoExt                 FreeCAD_1.1.0-Windows-x86_64-py311
DEBUG[1774688065] $substitutions.$minorVersion                  1
DEBUG[1774688065] $substitutions.$matchTail
DEBUG[1774688065] $substitutions.$matchHead                     1.1.0
DEBUG[1774688065] $substitutions.$preReleaseVersion             1.1.0
DEBUG[1774688065] $substitutions.$dashVersion                   1-1-0
DEBUG[1774688065] $substitutions.$cleanVersion                  110
DEBUG[1774688065] $substitutions.$matchTag                      1.1.0
DEBUG[1774688065] $substitutions.$baseurl                       https://github.com/FreeCAD/FreeCAD/releases/download/1.1.0
DEBUG[1774688065] $hashfile_url = https://github.com/FreeCAD/FreeCAD/releases/download/1.1.0/FreeCAD_1.1.0-Windows-x86_64-py311.7z-SHA256.txt -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:233:5
Searching hash for FreeCAD_1.1.0-Windows-x86_64-py311.7z in https://github.com/FreeCAD/FreeCAD/releases/download/1.1.0/FreeCAD_1.1.0-Windows-x86_64-py311.7z-SHA256.txt
DEBUG[1774688065] $filenameRegex = ([a-fA-F0-9]{32,128})[\x20\t]+.*FreeCAD_1\.1\.0-Windows-x86_64-py311\.7z(?:\s|$)|FreeCAD_1\.1\.0-Windows-x86_64-py311\.7z[\x20\t]+.*?([a-fA-F0-9]{32,128}) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:101:13
Found: 040a6971614e7ad0455b4080b13144f9c6b2e154904d9fd443fd8dd357927cab using Extract Mode
Writing updated freecad manifest

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ develop ≡]
└─> scoop install Unofficial/freecad.json
Installing 'freecad' (1.1.0) [64bit] from 'Unofficial' bucket
Loading FreeCAD_1.1.0-Windows-x86_64-py311.7z from cache.
Checking hash of FreeCAD_1.1.0-Windows-x86_64-py311.7z... OK.
Extracting FreeCAD_1.1.0-Windows-x86_64-py311.7z... Done.
Running pre_install script... Done.
Linking D:\Software\Scoop\Local\apps\freecad\current => D:\Software\Scoop\Local\apps\freecad\1.1.0
Creating shim for 'FreeCADCmd'.
Creating shortcut for FreeCAD (FreeCAD.exe)
'freecad' (1.1.0) was installed successfully!
  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • Chores
    • Updated FreeCAD to version 1.1.0
    • Clarified license information with a link to the official LICENSE
    • Updated Windows installer download and checksum for the new release
    • Improved automatic update detection and download selection for Windows assets

@github-actions

Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

freecad

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

@coderabbitai

coderabbitai Bot commented Mar 28, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 845c73f8-0b6a-4c60-89ba-5d81918b0dc5

📥 Commits

Reviewing files that changed from the base of the PR and between 2b4c06f and 6a0638c.

📒 Files selected for processing (1)
  • bucket/freecad.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • bucket/freecad.json

Walkthrough

Manifest bucket/freecad.json updated to version 1.1.0: license field restructured to an object, Windows 64-bit artifact URL and SHA256 updated, checkver switched from regex-only to jsonpath+regex extraction, autoupdate URL template adjusted, and autoupdate hash regex mode changed to singleline. No changes to pre_install.

Changes

Cohort / File(s) Summary
FreeCAD manifest
bucket/freecad.json
Bump version 1.0.2 → 1.1.0. Convert license string to object with identifier and url. Update Windows x64 download URL and sha256. Replace checkver regex selection with jsonpath selecting Windows .7z browser_download_url and new regex capturing tag/name. Change autoupdate URL template to use $matchTag/$matchName. Adjust autoupdate hash regex from multiline (?sm) to singleline (?s). No change to pre_install logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐇 I sniffed a tag and found a name,

1.0.2 hopped off—1.1.0 came!
I nudged the URL and tuned the hash,
JSONPath led me to the stash,
A carrot-coded hop—manifest fame! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: version update to 1.1.0 and fixes to checkver & autoupdate functionality, clearly summarizing the primary objectives.
Description check ✅ Passed The PR description is comprehensive, covering all major changes with detailed sections on version update, license modernization, pre_install improvements, checkver enhancements, and autoupdate refinements. Both required checklist items are marked complete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@z-Fng

z-Fng commented Mar 29, 2026

Copy link
Copy Markdown
Member

Robust pre_install:

  • Replace the mv */* . command with a PowerShell while loop that automatically detects and flattens nested top-level directories (up to 5 levels).
  • This ensures successful installation even if the upstream ZIP structure changes or contains unexpected wrappers.

I don't think this is necessary. PR changes should focus on fixing key issues as much as possible. And there are potential issues similar to ScoopInstaller/Scoop#6011.

@z-Fng

z-Fng commented Mar 29, 2026

Copy link
Copy Markdown
Member

/verify

@github-actions

Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

freecad

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

@z-Fng z-Fng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your contribution!

@z-Fng z-Fng merged commit b7cb515 into ScoopInstaller:master Mar 29, 2026
3 checks passed
@SorYoshino

Copy link
Copy Markdown
Contributor Author

I don't think this is necessary. PR changes should focus on fixing key issues as much as possible. And there are potential issues similar to ScoopInstaller/Scoop#6011.

I do not think aliases should be used in a relatively large project like this. While implementing this PR, I also noticed that the archive structure had changed in one of the earlier versions, so I adjusted it accordingly.

As for potential issues similar to those mentioned in ScoopInstaller/Scoop#6011, I have to acknowledge that they may indeed exist. However, such issues would only occur in cases where files need to be moved two or more times. If that situation actually arises, the original script would also need to be modified at that point. In my view, there is therefore no significant difference between the two approaches.

@SorYoshino SorYoshino deleted the freecad branch March 29, 2026 14:40
@z-Fng

z-Fng commented Apr 4, 2026

Copy link
Copy Markdown
Member

While implementing this PR, I also noticed that the archive structure had changed in one of the earlier versions, so I adjusted it accordingly.

Oh, I wasn't aware of that. If that's the case, then this change does indeed make sense. However, since it's already been merged, perhaps we could wait until the issue arises again and make the change then, using that as a reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants