-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2336 from corbob/add-azcopy10
(azcopy10) Migrate package to new repository
- Loading branch information
Showing
5 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. --> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | ||
<metadata> | ||
<id>azcopy10</id> | ||
<version>10.21.1</version> | ||
<title>azcopy10</title> | ||
<authors>Microsoft</authors> | ||
<owners>chocolatey-community</owners> | ||
<projectUrl>https://github.com/Azure/azure-storage-azcopy</projectUrl> | ||
<packageSourceUrl>https://github.com/chocolatey-community/chocolatey-packages/tree/master/automatic/azcopy10</packageSourceUrl> | ||
<iconUrl>https://cdn.jsdelivr.net/gh/chocolatey-community/chocolatey-packages@de115ff0e16d124c2099b8f95bd08bb92b6e4918/icons/azcopy10.png</iconUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<licenseUrl>https://raw.githubusercontent.com/Azure/azure-storage-azcopy/master/LICENSE</licenseUrl> | ||
<docsUrl>https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10</docsUrl> | ||
<tags>azcopy azure admin cli</tags> | ||
<summary>AzCopy is the command-line utility for copying data to or from Microsoft Azure Blob and File storage.</summary> | ||
<description><![CDATA[AzCopy **(v10)** is the **new** command-line utility designed for high-performance uploading, downloading, and copying data to and from Microsoft Azure Blob and File. | ||
It has a whole new syntax incompatible with the old v8 versions. You can use them side-by-side. | ||
Now packaged as a single exe file with simple commands designed for optimal performance. You can copy data between a file system and a storage account, or between storage accounts. | ||
]]></description> | ||
</metadata> | ||
<files> | ||
<file src="tools\**" target="tools" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.