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

rel-eng/upload: Add set_symlink mode

This slightly eases updating of the `latest` symlinks.
parent 1f67ad21
No related branches found
No related tags found
No related merge requests found
...@@ -59,8 +59,10 @@ usage() { ...@@ -59,8 +59,10 @@ usage() {
echo " prepare_docs prepare the documentation directory" echo " prepare_docs prepare the documentation directory"
echo " upload_docs upload documentation downloads.haskell.org" echo " upload_docs upload documentation downloads.haskell.org"
echo " upload upload the tarballs and documentation to downloads.haskell.org" echo " upload upload the tarballs and documentation to downloads.haskell.org"
echo " set_symlink <symlink>"
echo " set the given symlink (e.g. latest) to the current version"
echo " purge_all purge entire release from the CDN" echo " purge_all purge entire release from the CDN"
echo " purge_file file purge a given file from the CDN" echo " purge_file <file> purge a given file from the CDN"
echo " verify verify the signatures in this directory" echo " verify verify the signatures in this directory"
echo echo
} }
...@@ -200,6 +202,14 @@ function upload_docs() { ...@@ -200,6 +202,14 @@ function upload_docs() {
"$GHC_TREE/.gitlab/rel_eng/upload_ghc_libs.py" upload --docs=hackage_docs ${args[@]} "$GHC_TREE/.gitlab/rel_eng/upload_ghc_libs.py" upload --docs=hackage_docs ${args[@]}
} }
function set_symlink() {
local SYMLINK="$1"
# Check to make sure that the indicated version actually exists.
curl "https://downloads.haskell.org/ghc/$ver" > /dev/null || (echo "$ver doesn't exist"; exit 1)
echo -e "rm ghc/$SYMLINK\nln -s $ver ghc/$SYMLINK" | sftp ghc@downloads-origin.haskell.org
curl -X PURGE "http://downloads.haskell.org/~ghc/$SYMLINK"
}
if [ "x$1" == "x" ]; then if [ "x$1" == "x" ]; then
recompress recompress
gen_hashes gen_hashes
......
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