From b6920450e0fc6d29a75993b7494ac625168978d7 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Wed, 1 May 2019 16:22:05 -0700 Subject: [PATCH] improve release script --- release.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/release.js b/release.js index 49a7eaf..a87136f 100644 --- a/release.js +++ b/release.js @@ -2,7 +2,12 @@ const url = require('url') const clipboardy = require('clipboardy') module.exports = async markdown => { - const URL = process.env.URL || process.env.NOW_URL || clipboardy.readSync() + let URL = process.env.URL || process.env.NOW_URL || clipboardy.readSync() + + if (!URL.startsWith('http')) { + URL = 'https://' + URL + } + const { host } = url.parse(URL) if (host) {