diff --git a/automatic/1password/1password.json b/automatic/1password/1password.json
index 4f93c4d4e62..cc491f1bca3 100644
--- a/automatic/1password/1password.json
+++ b/automatic/1password/1password.json
@@ -1,4 +1,4 @@
-{
- "OPW": "7.9.835",
- "OPW4": "4.6.2.626"
+{
+ "OPW4": "4.6.2.62600",
+ "OPW7": "7.9.835"
}
diff --git a/automatic/1password/1password.nuspec b/automatic/1password/1password.nuspec
index 93838643f9a..0508c0a595c 100644
--- a/automatic/1password/1password.nuspec
+++ b/automatic/1password/1password.nuspec
@@ -24,15 +24,12 @@
- **If the package is out of date please check [Version History](#versionhistory) for the latest submitted version. If you have a question, please ask it in [Chocolatey Community Package Discussions](https://github.com/chocolatey-community/chocolatey-packages/discussions) or raise an issue on the [Chocolatey Community Packages Repository](https://github.com/chocolatey-community/chocolatey-packages/issues) if you have problems with the package. Disqus comments will generally not be responded to.**
]]>
1Password - Have you ever forgotten a password?
- ©2021 AgileBits, Inc. All rights reserved.
- 1password password keystore keys saver admin trial cross-platform
+ © 2024 1Password. All rights reserved.
+ 1password utility trial cross-platform password keystore keys
https://github.com/chocolatey-community/chocolatey-packages/tree/master/automatic/1password
-
-
+
-
-
-
+
diff --git a/automatic/1password/Readme.md b/automatic/1password/Readme.md
deleted file mode 100644
index 22bac56985d..00000000000
--- a/automatic/1password/Readme.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# [ 1Password](https://chocolatey.org/packages/1password)
-
-1Password can create strong, unique passwords for you, remember them, and restore them, all directly in your web browser.
-
-![screenshot](https://github.com/chocolatey-community/chocolatey-coreteampackages/blob/master/automatic/1password/screenshot.png?raw=true)
-
-## Notes
-
-- This package provides only the latest version of 1Password. If there is a need for the 4.x version of 1Password, please install the [1password4](https://chocolatey.org/packages/1password4) package instead.
-
-- **If the package is out of date please check [Version History](#versionhistory) for the latest submitted version. If you have a question, please ask it in [Chocolatey Community Package Discussions](https://github.com/chocolatey-community/chocolatey-packages/discussions) or raise an issue on the [Chocolatey Community Packages Repository](https://github.com/chocolatey-community/chocolatey-packages/issues) if you have problems with the package. Disqus comments will generally not be responded to.**
diff --git a/automatic/1password/screenshot.png b/automatic/1password/screenshot.png
deleted file mode 100644
index 837b3499f79..00000000000
Binary files a/automatic/1password/screenshot.png and /dev/null differ
diff --git a/automatic/1password/tools/chocolateyInstall.ps1 b/automatic/1password/tools/chocolateyInstall.ps1
deleted file mode 100644
index 9107bce2e57..00000000000
--- a/automatic/1password/tools/chocolateyInstall.ps1
+++ /dev/null
@@ -1,39 +0,0 @@
-$ErrorActionPreference = 'Stop'
-
-$packageArgs = @{
- packageName = $env:ChocolateyPackageName
- fileType = 'exe'
- url = 'https://c.1password.com/dist/1P/win6/1PasswordSetup-7.9.835.exe'
- softwareName = '1Password*'
- checksum = '3d43ea28c46a1dac9cc645c5d9f4692cd1be009145ffe5260a910a2d9c89dd52'
- checksumType = 'sha256'
- silentArgs = "--silent"
- validExitCodes = @(0)
-}
-
-if ($env:ChocolateyPackageName -eq "1password4") {
- $cache_dir = Get-PackageCacheLocation
-}
-else {
- $cache_dir = Join-Path -Path $env:LocalAppData -ChildPath "1password\logs\setup"
-}
-
-# Installer blocks at the end and never returns. Successifull installation is visible in the log file
-Start-Job -ScriptBlock { param($cache_dir)
- Remove-Item $cache_dir\*.log -Recurse -ea 0
- $seconds = 0; $max_seconds = 600
-
- while ($seconds -lt $max_seconds) {
- Start-Sleep 1; $seconds++
-
- $logFilePath = Get-ChildItem $cache_dir\*.log -Recurse | Select-Object -First 1
- if (!$logFilePath) { continue }
-
- $log = Get-Content $logFilePath
- if ($log -like '*Installation successful!' -or $log -like '*Installation completed successfully!*') {
- Get-Process $env:ChocolateyPackageName -ea 0 | Stop-Process
- exit
- }
- }
-} -ArgumentList ($cache_dir)
-Install-ChocolateyPackage @packageArgs
diff --git a/automatic/1password/tools/chocolateyUninstall.ps1 b/automatic/1password/tools/chocolateyUninstall.ps1
deleted file mode 100644
index e9f8eb3a6fc..00000000000
--- a/automatic/1password/tools/chocolateyUninstall.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-$ErrorActionPreference = 'Stop';
-
-$packageName = $env:ChocolateyPackageName
-
-[array]$key = Get-UninstallRegistryKey -SoftwareName '1Password*'
-
-if ($key.Count -eq 1) {
- $key | ForEach-Object {
- $packageArgs = @{
- packageName = $packageName
- fileType = 'EXE'
- silentArgs = 'uninstall'
- validExitCodes = @(0)
- file = "$($_.UninstallString -replace ' uninstall')"
- }
-
- Uninstall-ChocolateyPackage @packageArgs
- }
-}
-elseif ($key.Count -eq 0) {
- Write-Warning "$packageName 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."
- Write-Warning "Please alert package maintainer the following keys were matched:"
- $key | ForEach-Object { Write-Warning "- $($_.DisplayName)" }
-}
diff --git a/automatic/1password/update.ps1 b/automatic/1password/update.ps1
index 5c61e27c058..8a6b7903ed3 100644
--- a/automatic/1password/update.ps1
+++ b/automatic/1password/update.ps1
@@ -1,70 +1,65 @@
-Import-Module Chocolatey-AU
-import-module $PSScriptRoot\..\..\extensions\chocolatey-core.extension\extensions\chocolatey-core.psm1
+param($IncludeStream = $global:au_IncludeStream, $Force)
-function global:au_SearchReplace {
- @{
- ".\tools\chocolateyInstall.ps1" = @{
- "(?i)^(\s*url\s*=\s*)'.*'" = "`${1}'$($Latest.URL32)'"
- "(?i)^(\s*checksum\s*=\s*)'.*'" = "`${1}'$($Latest.Checksum32)'"
- "(?i)^(\s*checksumType\s*=\s*)'.*'" = "`${1}'$($Latest.ChecksumType32)'"
- "(?i)^(\s*silentArgs\s*=\s*)['`"].*['`"]" = "`${1}`"$($Latest.SilentArgs)`""
- }
- }
-}
+Import-Module Chocolatey-AU
-function global:au_AfterUpdate {
- . "$PSScriptRoot/update_helper.ps1"
- if ($Latest.PackageName -eq '1password4') {
- removeDependencies ".\*.nuspec"
- addDependency ".\*.nuspec" "chocolatey-core.extension" "1.3.3"
+if (($IncludeStream -match "^OPW(?\d+)") -and (Test-Path "$PSScriptRoot\..\..\manual\1password$($Matches['major'])")) {
+ # Since this is a manual package, we will assume that the package itself needs to be updated.
+ Push-Location "$PSScriptRoot\..\..\manual\1password$($Matches['major'])"
+ try {
+ $oldVersion = $global:au_Version
+ . "./update.ps1" -NoUpdateCheck
+
+ if ($oldVersion) {
+ $global:au_Version = $oldVersion
+ } else {
+ $global:au_Version = $global:Latest.Version.ToString()
+ }
+ $global:au_Latest = $null
+ $global:Latest = $null
}
- else {
- addDependency ".\*.nuspec" 'dotnet4.7.2' '4.7.2.20180712'
+ finally {
+ Pop-Location
}
}
-
-function global:au_BeforeUpdate {
- if ($Latest.PackageName -eq '1password4') {
- $Latest.SilentArgs = '/VERYSILENT /NORESTART /SUPPRESSMSGBOXES /SP- /LOG=`"$($env:TEMP)\$($env:chocolateyPackageName).$($env:chocolateyPackageVersion).InnoInstall.log`"'
- }
- else {
- $Latest.SilentArgs = '--silent'
+else {
+ Get-ChildItem "$PSScriptRoot\..\1password*" | Where-Object { $_.Name -ne '1password' } | ForEach-Object {
+ . "$_\update.ps1"
}
}
-function Get-LatestOPW {
- param (
- [string]$url,
- [string]$kind
+function global:au_BeforeUpdate($Package) {
+ # This is done in the before update, otherwise the dependency is not updated.
+ $readmePath = $Latest.Readme
- )
-
- $url32 = Get-RedirectedUrl $url
- $verRe = 'Setup-|word-|\.exe$'
- $version = $url32 -split $verRe | Select-Object -last 1 -skip 1
- $version = $version -replace ('\.BETA', ' beta')
- $version = Get-Version $version
- $major = $version.ToString(1)
+ if ($readmePath -and (Test-Path $readmePath)) {
+ Set-DescriptionFromReadme $Package -SkipFirst 2 -ReadmePath $readmePath
+ }
+}
+function global:au_SearchReplace {
@{
- URL32 = $url32
- Version = $version.ToString()
- PackageName = $kind
+ "$($Latest.PackageName).nuspec" = @{
+ "(?i)(\