Skip to content

Commit 2518960

Browse files
committed
fix: dashboard domain cli output
1 parent 0f3b686 commit 2518960

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/manifest.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,23 @@ export class Manifest {
177177
) {
178178
hostnameSuffix = `.${hostnameSuffix}`;
179179
}
180-
const buildLink =
181-
this.site === 'default'
182-
? `https://${this.shortSha}${hostnameSuffix}`
183-
: `https://${this.site}-${this.shortSha}${hostnameSuffix}`;
180+
const buildLink = s;
181+
this.site === 'default'
182+
? `https://${this.shortSha}${hostnameSuffix}`
183+
: `https://${this.site}-${this.shortSha}${hostnameSuffix}`;
184184
const branchToken = branchToHostnameToken(this.branch);
185185
const stagingLink =
186186
this.site === 'default'
187187
? `https://${branchToken}${hostnameSuffix}`
188188
: `https://${this.site}-${branchToken}${hostnameSuffix}`;
189-
const dashboardLink = `https://${hostnameSuffix}/fileset/sites/${this.site}/${this.shortSha}`;
189+
let dashboardDomain = hostnameSuffix;
190+
dashboardDomain = dashboardDomain.startsWith('-dot-')
191+
? dashboardDomain.slice(5)
192+
: dashboardDomain;
193+
dashboardDomain = dashboardDomain.startsWith('.')
194+
? dashboardDomain.slice(1)
195+
: dashboardDomain;
196+
const dashboardLink = `https://${dashboardDomain}/fileset/sites/${this.site}/${this.shortSha}`;
190197
return {
191198
stagingLink: stagingLink,
192199
buildLink: buildLink,

0 commit comments

Comments
 (0)