Skip to content

Commit 8e294e9

Browse files
authored
ansible: don't assume the relative paths for staging & dist are the same (#3947)
Some non-mainline releases' src dirs differ from their dst dirs (i.e. v8-canary builds upload to `/home/staging/nodejs/custom` and then are promoted to `/home/dist/nodejs/v8-canary`. This wasn't being accounted for when we promoted files from the `dist-staging` bucket to the `dist-prod` bucket. Signed-off-by: flakey5 <[email protected]>
1 parent 8fc01e0 commit 8e294e9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ansible/www-standalone/tools/promote/upload_to_cloudflare.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ if [ -z ${staging_bucket+x} ]; then
3131
exit 1
3232
fi
3333

34-
relativedir=${dstdir/$dist_rootdir/"$site/"}
34+
relative_srcdir=${srcdir/$staging_rootdir/"$site/"}
35+
relative_dstdir=${dstdir/$dist_rootdir/"$site/"}
3536
tmpversion=$2
3637

37-
rclone copy $staging_bucket/$relativedir/$tmpversion/ $prod_bucket/$relativedir/$tmpversion/
38-
rclone copyto $staging_bucket/$relativedir/index.json $prod_bucket/$relativedir/index.json
39-
rclone copyto $staging_bucket/$relativedir/index.tab $prod_bucket/$relativedir/index.tab
38+
rclone copy $staging_bucket/$relative_srcdir/$tmpversion/ $prod_bucket/$relative_dstdir/$tmpversion/
39+
rclone copyto $staging_bucket/$relative_dstdir/index.json $prod_bucket/$relative_dstdir/index.json
40+
rclone copyto $staging_bucket/$relative_dstdir/index.tab $prod_bucket/$relative_dstdir/index.tab

0 commit comments

Comments
 (0)