-
-
Notifications
You must be signed in to change notification settings - Fork 11k
endnote 22 #210166
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
endnote 22 #210166
Conversation
EndNote 2025 (22.0.0.21347) has been released on https://endnote.com. As with the release of EndNote 21 (#147759), the livecheck URL for EndNote 22, $ wget -O- 'https://download.endnote.com/updates/22.0/EN22MacUpdates.xml'
--2025-04-25 15:03:07-- https://download.endnote.com/updates/22.0/EN22MacUpdates.xml
Resolving download.endnote.com (download.endnote.com)... 3.166.118.72, 3.166.118.124, 3.166.118.63, ...
Connecting to download.endnote.com (download.endnote.com)|3.166.118.72|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 70 [application/xml]
Saving to: ‘STDOUT’
- 0%[ ] 0 --.-KB/s <updates>
<data1></data1>
<data2></data2>
<data3>0</data3>
</updates>
- 100%[========================================================>] 70 --.-KB/s in 0s
2025-04-25 15:03:07 (16.7 MB/s) - written to stdout [70/70] |
241e9e4
to
e594efa
Compare
Thank you, @jabenninghoff! Could you please link the source for the new version and the updated download URL? The |
e594efa
to
cf176eb
Compare
@khipp, unfortunately, when Clarivate releases a new major version of EndNote, the new version and download URLs are only available on the support page which won't work with livecheck. I've implemented a workaround similar to what was done for the release of EndNote 21 (#147759). |
2631960
to
b3c3c6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How we approach this depends on whether the existing XML file for version 21 is updated to include versions beyond 22.0.0.0. If it will only ever reference 22.0.0.0, then this wouldn't ever be able tell us that a new version is available and we could end up being stuck on 22.0.0.0 until someone identifies a new version outside of livecheck and manually updates the cask.
If that's the case, then I think our only option would be to maintain the existing livecheck
block and allow it to fail (skipping livecheck on CI for this PR), assuming it will eventually return a new version when the next update appears. If we're not sure, this may be the safer approach. It's not ideal but the upstream setup isn't ideal either.
Looking at the available XML files,
Given that, should I leave the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that, should I leave the
livecheck
url
as-is? The livecheck will fail until the first update for EndNote 2025 is released.
Thanks for checking the older files. Yes, considering that 21.0.0.0 is present in the XML file for 20 but was never modified for subsequent 21 versions, the existing approach seems like the only option that will ensure the check will return a new version when it appears. However, I think it still makes sense to not omit html
entries (so we can catch new major version releases), so we just need to switch the url
back.
In terms of handling the livecheck failure for new major versions, we can either skip livecheck for major version PRs like this or we could modify the strategy
block to selectively return the cask version if the XML file doesn't contain update information and the cask version is a new major version (i.e., ending with .0.0.0
). We generally discourage falling back to the cask version in a strategy
block because the check will appear to be working as expected even if it's failing due to an unexpected upstream change. Selectively doing this for new major versions may be slightly less risky but it could become a problem if upstream decides to change the XML structure when creating a new major version.
I tend to be of the opinion that it's better to fail because that's something we can easily see and track. For example, when a new major version is released, we would see the failing check, look at the cask file and see the explanatory comment above the livecheck
block, and check the XML file to confirm there's no update information. If everything seems fine, we would probably ignore the failure (as something expected) but maybe periodically check the XML file again to confirm that there's not an update that we're missing due to a structural change.
Though not ideal, I think skipping livecheck for new major version PRs and allowing the check to fail until a new version appears may be the most reasonable approach. I've added a suggestion with a comment to explain the situation, so we know this is an expected failure. [For what it's worth, we generally only have explanatory comments before the livecheck
block or within strategy
blocks but not elsewhere in the livecheck
block.]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this some more, one issue that I didn't consider before is that hardcoding 2025 throughout the cask will become a problem when the next major version is released. When the livecheck
block returns 23.0.0.0 as the newest version, that will presumably correspond to something other than 2025. Updating the version wouldn't affect the url
, so the cask would continue to install the newest 22.x version unless the url
is manually updated in the version bump PR.
Including 2025 in the version (e.g., 22.0.0.0,2025
) and interpolating it throughout the cask would resolve this but the challenge is how can livecheck reliably identify the 2025 part of the version
. We could match the EN2025
part of the webPage
value for the major version build
item in XML files like EN21MacUpdates.xml
but this isn't true for the other build
items (i.e., for normal updates).
I think we could technically fetch the download page in the strategy
block and match 2025 from the EndNote2025Installer.dmg
filename on the page, combining that with the version from the XML file. However, this could lead to a mismatch between the version like 2025 and 22.0.0.0 if both sources aren't updated at the same time. Unless there's a source of version information that reliably provides both version parts for every release, that may be the best we can do if we want to surface major version updates.
The alternative is to leave the livecheck
block as it is (i.e., restoring the early return to exclude items with an html
type), so livecheck doesn't surface new major versions. This would require someone to manually identify a new major version and update the cask like you're doing here. This isn't ideal but it would at least ensure that the cask is properly updated for a new major version.
It seems like there are going to be shortcomings no matter how we approach this and it's just a matter of what variety of pain we prefer.
@samford, as I understand it, we can't use the download page for the livecheck because it is hydrated with javascript. Since version 17, Clarivate has changed the branding of EndNote 3 times (X7, X8, X9, 20, 21, 2025) and each major release has required manual changes to the cask. Major releases happen every 2-3 years, and it's difficult to guess how the next release will be branded, so it will probably require manual changes regardless. Given that, I'd suggest the best option is to keep the cask as-is, which we expect will work for new minor releases, and will let us know when a new major release is available. |
Ahh, I hadn't tested it yet but I'm seeing that it uses a gnarly
I agree that requiring manual changes to the cask with major version updates makes sense but I want to make sure that a major version update won't pass CI and be able to be merged unless/until the product/marketing version (e.g., X9, 2025, etc.) is also updated. It would be too easy for a maintainer to quickly glance at the version change, think it looks fine, and merge it without realizing that the I thought about this some more and what we could do is include the product version as the second part of the cask If that makes sense to you, I can push these changes to the PR branch. Unfortunately I can't add a suggestion for the livecheck |
@samford that all makes sense to me! Please do push the changes, thanks!! |
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
This modifies the `endnote` version to include the product version (e.g., X9, 2025, etc.) in the cask `version` and interpolates the value in the `url` and `container nested:` strings. This is primarily intended to ensure that a new major version update won't work unless/until the `version` is updated to include a product version. This allows us to set up the livecheck `strategy` block to add the existing product version to upstream versions in the XML file that use the same major version and omit it from versions with a different major. This setup ensures that a new major version from livecheck won't have a product version (e.g., `23.0.0.0`) and this will cause the cask to fail CI, unless/until the `version` is modified to include a product version. This will need to be manually identified, as mentioned in the relevant comment above the `version`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your help and patience, @jabenninghoff! Someone else will need to approve this (as I'm the last pusher) but I think this should be good to go now.
`item.elements["updateTo"]` can be nil, so we should also use a safe navigation operator before `.text`. Co-authored-by: Klaus Hipp <khipp@users.noreply.github.com>
Important: Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process.
In the following questions
<cask>
is the token of the cask you're submitting.After making any changes to a cask, existing or new, verify:
brew audit --cask --online <cask>
is error-free.brew style --fix <cask>
reports no offenses.Additionally, if adding a new cask:
brew audit --cask --new <cask>
worked successfully.HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask>
worked successfully.brew uninstall --cask <cask>
worked successfully.