Skip to content

Commit

Permalink
(zotero) changes by request
Browse files Browse the repository at this point in the history
  • Loading branch information
teknowledgist committed Oct 29, 2024
1 parent c92090a commit efa2269
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 33 deletions.
3 changes: 0 additions & 3 deletions automatic/zotero/legal/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Obtained from: https://raw.githubusercontent.com/zotero/zotero/refs/heads/main/COPYING
=======================================================================================

Zotero is Copyright © 2018 Corporation for Digital Scholarship,
Vienna, Virginia, USA http://digitalscholar.org

Expand Down
21 changes: 10 additions & 11 deletions automatic/zotero/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@ in verifying that this package's contents are trustworthy.

Package can be verified like this:

1. The installers can be obtained directly from:
1. Go to

32-bit download: https://download.zotero.org/client/release/7.0.7/Zotero-7.0.7_win32_setup.exe
64-bit download: https://download.zotero.org/client/release/7.0.7/Zotero-7.0.7_x64_setup.exe
x32: https://download.zotero.org/client/release/7.0.5/Zotero-7.0.5_win32_setup.exe
x64: https://download.zotero.org/client/release/7.0.5/Zotero-7.0.5_x64_setup.exe

to download the installer.

2. The following methods can calculate the SHA256 checksum of what you download
to allow you to compare against the checksums below:
- Use powershell function 'Get-FileHash'
- Use Chocolatey utility 'checksum.exe'
2. Get the checksum using one of the following methods:
- Using powershell function 'Get-FileHash'
- Use chocolatey utility 'checksum.exe'
3. The checksums should match the following:

32-bit checksum: 0189D2CB2114F77FEA18190B725E0C2F38FB6E17991809663956EE84A10136A3
64-bit checksum: EBA6DE61A660BAAC5865756DEC6D2D954919737F5F0C2F103AD4C92F7294B5B6
checksum32: DA8E5516D57DDE80812E76E122B7A2E86EDB57B61C25D8AD107C50C8FA4E52F3
checksum64: 43017a16c5d6c9748c6615d51464b0cbd7e1e42fe49ebdd556b46e47932e4737


The content of the file 'LICENSE.txt' is copied from:
The file 'LICENSE.txt' has been obtained from
https://raw.githubusercontent.com/zotero/zotero/refs/heads/main/COPYING
17 changes: 10 additions & 7 deletions automatic/zotero/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
$ErrorActionPreference = 'Stop'


$toolsPath = Split-Path -parent $MyInvocation.MyCommand.Definition
$Installers = Get-ChildItem -Path $toolsPath -Filter '*.exe' |
Sort-Object lastwritetime |
Select-Object -Last 2 -ExpandProperty FullName
$File32Name = 'Zotero-7.0.8_win32_setup.exe'
$File64Name = 'Zotero-7.0.8_x64_setup.exe'

$File32Path = Join-Path $toolsPath $File32Name
$File64Path = Join-Path $toolsPath $File64Name

$packageArgs = @{
packageName = $env:ChocolateyPackageName
softwareName = "$env:ChocolateyPackageName*"
softwareName = "Zotero*"
fileType = 'exe'
file = $Installers | Where-Object {$_ -match "win32"}
file64 = $Installers | Where-Object {$_ -match "x64"}
file = "$File32Path"
file64 = "$File64Path"
silentArgs = '/S'
validExitCodes = @(0)
}

Install-ChocolateyInstallPackage @packageArgs

Remove-Item $Installers -Force -ea 0
Remove-Item "$File32Path","$File64Path" -Force -ea 0
4 changes: 2 additions & 2 deletions automatic/zotero/tools/chocolateyUninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$packageArgs = @{
packageName = $env:ChocolateyPackageName
softwareName = "$env:ChocolateyPackageName*"
softwareName = "Zotero*"
fileType = 'exe'
silentArgs = '/S'
validExitCodes= @(@(0))
Expand All @@ -19,7 +19,7 @@ if ($key.Count -eq 1) {
Uninstall-ChocolateyPackage @packageArgs
}
} elseif ($key.Count -eq 0) {
Write-Warning "$packageName has already been uninstalled by other means."
Write-Warning "$env:ChocolateyPackageName has already been uninstalled by other means."
} elseif ($key.Count -gt 1) {
Write-Warning "$($key.Count) matches found!"
Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
Expand Down
16 changes: 9 additions & 7 deletions automatic/zotero/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ $releases = 'https://www.zotero.org/download/client/dl?channel=release&platform=
function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix }

function global:au_SearchReplace {
$version = $Latest.Version.ToString()

@{
".\legal\VERIFICATION.txt" = @{
"(?i)(^\s*32-bit download\:).*" = "`${1} $($Latest.URL32)"
"(?i)(^\s*64-bit download\:).*" = "`${1} $($Latest.URL64)"
"(?i)(^\s*32-bit checksum\:).*" = "`${1} $($Latest.Checksum32)"
"(?i)(^\s*64-bit checksum\:).*" = "`${1} $($Latest.Checksum64)"
"(?i)(^\s*x32\:).*" = "`${1} $($Latest.URL32)"
"(?i)(^\s*x64\:).*" = "`${1} $($Latest.URL64)"
"(?i)(^\s*checksum32\:).*" = "`${1} $($Latest.Checksum32)"
"(?i)(^\s*checksum64\:).*" = "`${1} $($Latest.Checksum64)"
}
".\tools\chocolateyInstall.ps1" = @{
"(?i)(^[$]File32Name =).*" = "`${1} '$($Latest.URL32.split('/')[-1])'"
"(?i)(^[$]File64Name =).*" = "`${1} '$($Latest.URL64.split('/')[-1])'"
}
}
}
Expand All @@ -22,7 +24,7 @@ function global:au_GetLatest {
$url64 = Get-RedirectedUrl -url $releases
$url32 = $url64 -replace 'x64','win32'

$version = $url64.split('/') | Where-Object {$_ -match '^[0-9.]+$'}
$version = $url64 -split '/' | Where-Object {$_ -match '^\d+\.\d[0-9.]*$'} | Select-Object -Last 1

@{
Version = $version
Expand Down
6 changes: 3 additions & 3 deletions automatic/zotero/zotero.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<metadata>
<!-- == PACKAGE SPECIFIC SECTION == -->
<id>zotero</id>
<version>7.0.7</version>
<version>7.0.5</version>
<packageSourceUrl>https://github.com/chocolatey-community/chocolatey-packages/tree/master/automatic/zotero</packageSourceUrl>
<owners>chocolatey-community</owners>
<!-- == SOFTWARE SPECIFIC SECTION == -->
<title>Zotero</title>
<authors>The Corporation for Digital Scholarship and contributors</authors>
<authors>Corporation for Digital Scholarship</authors>
<projectUrl>https://www.zotero.org/</projectUrl>
<iconUrl>https://cdn.jsdelivr.net/gh/chocolatey-community/chocolatey-packages@53607633ce049d5d75ac668f4408faaeced36bc3/icons/zotero.png</iconUrl>
<copyright>2006-2011, Center for History and New Media, George Mason University, Fairfax, Virginia, USA</copyright>
Expand All @@ -19,7 +19,7 @@
<docsUrl>https://www.zotero.org/support</docsUrl>
<mailingListUrl>https://forums.zotero.org/discussions</mailingListUrl>
<bugTrackerUrl>https://github.com/zotero/zotero/issues</bugTrackerUrl>
<tags>zotero references manager bibliography citations research foss cross-platform embedded</tags>
<tags>zotero productivity foss cross-platform references manager bibliography citations research embedded</tags>
<summary>Zotero [zoh-TAIR-oh] is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources. </summary>
<!-- Do not touch the description here in the nuspec file. Description is imported during update from the Readme.md file -->
<description><![CDATA[Zotero is free and open-source reference management software to manage bibliographic data and related research materials (such as PDF files). Notable features include web browser integration, online syncing, generation of in-text citations, footnotes and bibliographies, as well as integration with the word processors Microsoft Word, LibreOffice, OpenOffice.org Writer and NeoOffice.
Expand Down

4 comments on commit efa2269

@ZacharyVernec
Copy link

Choose a reason for hiding this comment

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

Hi teknowledgist,

I saw you had some issues getting your pull request approved.
I'm willing to help, as I really want to get Zotero 64bit in chocolatey.

I don't think I can see what issues you are having with the merge right now though.
Could you add me as a collaborator to this repo?

Thanks.

@teknowledgist
Copy link
Owner Author

Choose a reason for hiding this comment

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

@ZacharyVernec I also want Zotero 64bit, and I'm rather shocked that I am the one leading the charge! 😨

If you look at the PR discussion, I had to jump through some hoops, but I believe the only remaining issue(s) is:

please also rebase your PR, as well as update any existing commits to have the prefix (zotero) in front of them.

I am OK with Powershell code, and stumble through GitHub Desktop, but I am a dunderhead when it comes to Git; I don't know how to do those things.

If you know how, can make those changes as a collaborator, and promise not to run roughshod over the rest of my repo, I would welcome the help.

@ZacharyVernec
Copy link

Choose a reason for hiding this comment

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

Yes I saw the PR discussion, that's why I contacted you. I'm willing to give rebasing a shot.

I would consider myself an intermediate Git user. I don't think I've rebased before, but I've read about it a number of times.

But don't worry, I won't do anything without being confident about the results, I'll be respectful and careful with your repo.

@teknowledgist
Copy link
Owner Author

Choose a reason for hiding this comment

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

@ZacharyVernec OK. I made you a collaborator. Not sure if you got an invite or I need to follow up with that, but let's see what you can do. 😉

Please sign in to comment.