Skip to content

Commit a83250d

Browse files
committed
Update upload logic to upload right directory
1 parent 571366f commit a83250d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.azure-pipelines/steps/run.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,19 @@ steps:
107107

108108
- bash: |
109109
set -e
110+
if [ "$AGENT_OS" = "Linux" ]; then
111+
rm -rf obj/build/dist/doc
112+
upload_dir=obj/build/dist deploy/$BUILD_SOURCEVERSION
113+
else
114+
rm -rf build/dist/doc
115+
upload_dir=build/dist
116+
fi
117+
ls -la $upload_dir
110118
deploy_dir=rustc-builds
111119
if [ "$DEPLOY_ALT" == "1" ]; then
112120
deploy_dir=rustc-builds-alt
113121
fi
114-
aws s3 cp --no-progress --recursive --acl public-read ./deploy s3://$DEPLOY_BUCKET/$deploy_dir
122+
aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
115123
env:
116124
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
117125
condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))

0 commit comments

Comments
 (0)