File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -163,19 +163,29 @@ export class Manifest {
163
163
}
164
164
165
165
get links ( ) : ManifestLinks {
166
- // TODO: Allow customizing the staging URL using `fileset.yaml` configuration.
167
- const hostnameSuffix =
166
+ let hostnameSuffix =
168
167
process . env . FILESET_BASE_URL ||
169
168
`fileset-dot-${ this . googleCloudProject } .appspot.com` ;
169
+ if (
170
+ hostnameSuffix . includes ( '-dot-' ) &&
171
+ ! hostnameSuffix . startsWith ( '-dot-' )
172
+ ) {
173
+ hostnameSuffix = `-dot-${ hostnameSuffix } ` ;
174
+ } else if (
175
+ ! hostnameSuffix . startsWith ( '.' ) &&
176
+ ! hostnameSuffix . includes ( '-dot-' )
177
+ ) {
178
+ hostnameSuffix = `.${ hostnameSuffix } ` ;
179
+ }
170
180
const buildLink =
171
181
this . site === 'default'
172
- ? `https://${ this . shortSha } -dot- ${ hostnameSuffix } `
173
- : `https://${ this . site } -${ this . shortSha } -dot- ${ hostnameSuffix } ` ;
182
+ ? `https://${ this . shortSha } ${ hostnameSuffix } `
183
+ : `https://${ this . site } -${ this . shortSha } ${ hostnameSuffix } ` ;
174
184
const branchToken = branchToHostnameToken ( this . branch ) ;
175
185
const stagingLink =
176
186
this . site === 'default'
177
- ? `https://${ branchToken } -dot- ${ hostnameSuffix } `
178
- : `https://${ this . site } -${ branchToken } -dot- ${ hostnameSuffix } ` ;
187
+ ? `https://${ branchToken } ${ hostnameSuffix } `
188
+ : `https://${ this . site } -${ branchToken } ${ hostnameSuffix } ` ;
179
189
const dashboardLink = `https://${ hostnameSuffix } /fileset/sites/${ this . site } /${ this . shortSha } ` ;
180
190
return {
181
191
stagingLink : stagingLink ,
You can’t perform that action at this time.
0 commit comments