Skip to content

Commit 508d66b

Browse files
committed
Auto merge of #3500 - alexcrichton:appveyor-new-deploy, r=alexcrichton
Try using before_deploy on AppVeyor
2 parents 154a30b + 8fd4fe0 commit 508d66b

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

appveyor.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,16 @@ cache:
4949
- target
5050
- C:\Users\appveyor\.cargo\registry
5151

52-
after_test:
53-
- ps: New-Item -Path "${env:APPVEYOR_REPO_COMMIT}" -ItemType "directory"
54-
- ps: New-Item -Path "target" -ItemType "directory" -Force
55-
- ps: New-Item -Path "target/${env:TARGET}" -ItemType "directory" -Force
56-
- ps: New-Item -Path "target/${env:TARGET}/release" -ItemType "directory" -Force
57-
- ps: New-Item -Path "target/${env:TARGET}/release/dist" -ItemType "directory" -Force
58-
- ps: Get-ChildItem -Path target\${env:TARGET}\release\dist -Filter '*.tar.gz' | Move-Item -Destination ${env:APPVEYOR_REPO_COMMIT}
59-
- ps: Get-FileHash .\${env:APPVEYOR_REPO_COMMIT}\* | ForEach-Object {[io.file]::WriteAllText($_.Path + ".sha256", $_.Hash.ToLower() + "`n")}
60-
61-
artifacts:
62-
- path: $(APPVEYOR_REPO_COMMIT)\cargo-*
63-
name: cargo
52+
before_deploy:
53+
- ps: |
54+
New-Item -Path deploy -ItemType directory
55+
Get-ChildItem -Path target\${env:TARGET}\release\dist -Filter '*.tar.gz' | Move-Item -Destination deploy
56+
Get-FileHash .\deploy\* | ForEach-Object {
57+
[io.file]::WriteAllText($_.Path + ".sha256", $_.Hash.ToLower() + "`n")
58+
}
59+
Get-ChildItem -Path deploy | Foreach-Object {
60+
Push-AppveyorArtifact $_.FullName -FileName ${env:APPVEYOR_REPO_COMMIT}/$_.BaseName
61+
}
6462
6563
deploy:
6664
- provider: S3
@@ -71,7 +69,7 @@ deploy:
7169
bucket: rust-lang-ci
7270
set_public: true
7371
region: us-east-1
74-
artifact: cargo
7572
folder: cargo-builds
73+
artifact: /.*\.(tar.gz|sha256)/
7674
on:
7775
branch: auto-cargo

0 commit comments

Comments
 (0)