From ec3706c0bf3be4969514b4b58aed5b7052a1e773 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Wed, 27 Apr 2022 15:53:16 +0800 Subject: [PATCH] remove git.io --- ci/upload.sc | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/ci/upload.sc b/ci/upload.sc index 3354c320e1..8a0e7a691a 100644 --- a/ci/upload.sc +++ b/ci/upload.sc @@ -1,17 +1,6 @@ #!/usr/bin/env amm import ammonite.ops._ -@main -def shorten(longUrl: String) = { - println("shorten longUrl " + longUrl) - val shortUrl = requests.post( - "https://git.io", - data = Seq("url" -> longUrl), - ).headers("location").head - - println("shorten shortUrl " + shortUrl) - shortUrl -} @main def apply(uploadedFile: Path, tagName: String, @@ -47,10 +36,5 @@ def apply(uploadedFile: Path, println(res.text) val longUrl = ujson.read(res.text)("browser_download_url").str.toString - println("Long Url " + longUrl) - - val shortUrl = shorten(longUrl) - - println("Short Url " + shortUrl) - shortUrl + longUrl }