Skip to content
Snippets Groups Projects
Commit 0590764c authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

rel_eng/upload: Purge both $rel_name/ and $ver/

This is necessary for prereleases, where GHCup accesses the release via
`$ver/`
parent 7810b4c3
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ function upload() {
}
function purge_all() {
dir="$(echo $rel_name | sed s/-release//)"
local dir="$(echo $rel_name | sed s/-release//)"
# Purge CDN cache
curl -X PURGE http://downloads.haskell.org/ghc/
curl -X PURGE http://downloads.haskell.org/~ghc/
......@@ -150,12 +150,18 @@ function purge_all() {
}
function purge_file() {
curl -X PURGE http://downloads.haskell.org/~ghc/$rel_name/$i
curl -X PURGE http://downloads.haskell.org/~ghc/$rel_name/$i/
curl -X PURGE http://downloads.haskell.org/~ghc/$rel_name/$i/docs/
curl -X PURGE http://downloads.haskell.org/ghc/$rel_name/$i
curl -X PURGE http://downloads.haskell.org/ghc/$rel_name/$i/
curl -X PURGE http://downloads.haskell.org/ghc/$rel_name/$i/docs/
dirs=(
"~ghc/$rel_name"
"ghc/$rel_name"
"~ghc/$ver"
"ghc/$ver"
)
for dir in ${dirs[@]}; do
curl -X PURGE http://downloads.haskell.org/$dir/$i
curl -X PURGE http://downloads.haskell.org/$dir/$i/
curl -X PURGE http://downloads.haskell.org/$dir/$i/docs/
done
}
function prepare_docs() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment