diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8501ee5251a..60b11ca7231 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -42,6 +42,7 @@ */nexus-repository* @chocolatey-community/chocolatey-team-maintainers */totalcommander* @pauby */kubescape* @HollowMan6 +*/azcopy10* @chocolatey-community/chocolatey-team-maintainers # Other # This can be any file other that won't be matched as a package diff --git a/automatic/azcopy10/azcopy10.nuspec b/automatic/azcopy10/azcopy10.nuspec new file mode 100644 index 00000000000..34693a20d3e --- /dev/null +++ b/automatic/azcopy10/azcopy10.nuspec @@ -0,0 +1,27 @@ + + + + + azcopy10 + 10.21.1 + azcopy10 + Microsoft + chocolatey-community + https://github.com/Azure/azure-storage-azcopy + https://github.com/chocolatey-community/chocolatey-packages/tree/master/automatic/azcopy10 + https://cdn.jsdelivr.net/gh/chocolatey-community/chocolatey-packages@de115ff0e16d124c2099b8f95bd08bb92b6e4918/icons/azcopy10.png + false + https://raw.githubusercontent.com/Azure/azure-storage-azcopy/master/LICENSE + https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10 + azcopy azure admin cli + AzCopy is the command-line utility for copying data to or from Microsoft Azure Blob and File storage. + + + + + + diff --git a/automatic/azcopy10/tools/chocolateyInstall.ps1 b/automatic/azcopy10/tools/chocolateyInstall.ps1 new file mode 100644 index 00000000000..aa6da6a14e9 --- /dev/null +++ b/automatic/azcopy10/tools/chocolateyInstall.ps1 @@ -0,0 +1,25 @@ +$ErrorActionPreference = 'Stop'; + +$packageName = 'azcopy10' +$toolsDir = Split-Path -Parent $MyInvocation.MyCommand.Definition + +$packageArgs = @{ + packageName = $packageName + url64 = 'https://azcopyvnext.azureedge.net/releases/release-10.21.1-20231025/azcopy_windows_amd64_10.21.1.zip' + checksum64 = '12927c211b3da7ea0df28277d4a69ff7a6046cd8ad3163b40fc2b31a96d66e81' + checksumType64 = 'sha256' + url = 'https://azcopyvnext.azureedge.net/releases/release-10.21.1-20231025/azcopy_windows_386_10.21.1.zip' + checksum = '461990141b1ff495a2cf25f2809169c541bd53364ce32fc43b912f4c664b9a23' + checksumType = 'sha256' + destination = $toolsDir +} + +#Manage azcopy installation +Install-ChocolateyZipPackage @packageArgs + +$targetPath = Join-Path -Path $toolsDir -ChildPath 'azcopy' +If (Test-Path -Path $targetPath -PathType:Container) { + Remove-Item -Path $targetPath -Force -Recurse +} + +Get-ChildItem -Path $toolsDir -Directory -Filter "azcopy*" | Rename-Item -NewName 'azcopy' -Force diff --git a/automatic/azcopy10/update.ps1 b/automatic/azcopy10/update.ps1 new file mode 100644 index 00000000000..34f892fd300 --- /dev/null +++ b/automatic/azcopy10/update.ps1 @@ -0,0 +1,32 @@ +import-module au + +$releases = 'https://aka.ms/downloadazcopy-v10-windows' + +function global:au_SearchReplace { + @{ + ".\tools\chocolateyInstall.ps1" = @{ + "(?i)(^\s*url64\s*=\s*)('.*')" = "`$1'$($Latest.URL64)'" + "(?i)(^\s*checksum64\s*=\s*)('.*')" = "`$1'$($Latest.Checksum64)'" + "(?i)(^\s*checksumType64\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType64)'" + "(?i)(^\s*url\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'" + "(?i)(^\s*checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'" + "(?i)(^\s*checksumType\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType32)'" + } + } +} + +function global:au_GetLatest { + $download_page = Invoke-WebRequest -Uri $releases -MaximumRedirection 0 -ErrorAction SilentlyContinue + + $url64 = $download_page.Headers.Location + $url32 = $url64 -replace "amd64", "386" + $version = $url64 -replace ".zip", "" -split "_" | Select-Object -Last 1 + + @{ + URL32 = $url32 + URL64 = $url64 + Version = $version + } +} + +update -ChecksumFor all diff --git a/icons/azcopy10.png b/icons/azcopy10.png new file mode 100644 index 00000000000..292a038e046 Binary files /dev/null and b/icons/azcopy10.png differ