Skip to content

Commit a11bcc6

Browse files
committed
Exporting without https://
1 parent 541dc43 commit a11bcc6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/deploy.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ const exec_command = (command) => __awaiter(void 0, void 0, void 0, function* ()
5353
return stdout;
5454
});
5555
const deploy = (command, deployAlias) => __awaiter(void 0, void 0, void 0, function* () {
56-
var _a, _b, _c;
56+
var _a, _b, _c, _d;
5757
const stdout = yield exec_command(command);
58-
const deploymentUrl = (_a = stdout.match(/https?:\/\/[^ ]+.vercel.app/gi)) === null || _a === void 0 ? void 0 : _a.shift();
59-
const customDeploymentFile = (_c = (_b = stdout.match(/--local-config=.[^$]+?.json/gs)) === null || _b === void 0 ? void 0 : _b.shift()) === null || _c === void 0 ? void 0 : _c.split("=").find(el => el.endsWith(".json"));
58+
const deploymentUrl = (_b = (_a = stdout.match(/https?:\/\/[^ ]+.vercel.app/gi)) === null || _a === void 0 ? void 0 : _a.shift()) === null || _b === void 0 ? void 0 : _b.replace("https://", "");
59+
const customDeploymentFile = (_d = (_c = stdout.match(/--local-config=.[^$]+?.json/gs)) === null || _c === void 0 ? void 0 : _c.shift()) === null || _d === void 0 ? void 0 : _d.split("=").find(el => el.endsWith(".json"));
6060
core.debug(`Command: ${command}`);
6161
core.debug(`Custom deploy file: ${customDeploymentFile}`);
6262
if (deploymentUrl) {
63-
core.debug(`Found url deployment: ${deploymentUrl}. Exporting it...`);
64-
core.exportVariable("VERCEL_DEPLOYMENT_URL", deploymentUrl);
65-
core.setOutput("VERCEL_DEPLOYMENT_URL", deploymentUrl);
63+
core.debug(`Found url deployment: VERCEL_DEPLOYMENT_DOMAIN=${deploymentUrl}. Exporting it...`);
64+
core.exportVariable("VERCEL_DEPLOYMENT_DOMAIN", deploymentUrl);
65+
core.setOutput("VERCEL_DEPLOYMENT_DOMAIN", deploymentUrl);
6666
if (deployAlias) {
6767
core.debug(`Starting to link aliases`);
6868
const globber = yield glob.create(customDeploymentFile);

src/deploy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ const exec_command = async (command: string): Promise<string> => {
3131
const deploy = async (command: string, deployAlias: boolean): Promise<void> => {
3232
const stdout: string = await exec_command(command)
3333

34-
const deploymentUrl: string | undefined = stdout.match(/https?:\/\/[^ ]+.vercel.app/gi)?.shift();
34+
const deploymentUrl: string | undefined = stdout.match(/https?:\/\/[^ ]+.vercel.app/gi)?.shift()?.replace("https://", "");
3535
const customDeploymentFile: any = stdout.match(/--local-config=.[^$]+?.json/gs)?.shift()?.split("=").find(el => el.endsWith(".json"));
3636

3737
core.debug(`Command: ${command}`)
3838
core.debug(`Custom deploy file: ${customDeploymentFile}`);
3939

4040
if (deploymentUrl) {
41-
core.debug(`Found url deployment: ${deploymentUrl}. Exporting it...`);
42-
core.exportVariable("VERCEL_DEPLOYMENT_URL", deploymentUrl);
43-
core.setOutput("VERCEL_DEPLOYMENT_URL", deploymentUrl);
41+
core.debug(`Found url deployment: VERCEL_DEPLOYMENT_DOMAIN=${deploymentUrl}. Exporting it...`);
42+
core.exportVariable("VERCEL_DEPLOYMENT_DOMAIN", deploymentUrl);
43+
core.setOutput("VERCEL_DEPLOYMENT_DOMAIN", deploymentUrl);
4444
if (deployAlias) {
4545
core.debug(`Starting to link aliases`);
4646
const globber: Globber = await glob.create(customDeploymentFile)

0 commit comments

Comments
 (0)