-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
effb332
commit 622365f
Showing
3 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
VITE_VERSION=$npm_package_version | ||
VITE_NAME=$npm_package_name | ||
VITE_FULL_URL=/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
#!/usr/bin/env node | ||
let url; | ||
let baseUrl; | ||
if (process.env.GITHUB_REPOSITORY_OWNER === "microbit-foundation") { | ||
// STAGE must be defined before this is imported | ||
const { bucketPrefix } = require("../deployment.cjs"); | ||
url = `/${bucketPrefix}/`; | ||
baseUrl = `/${bucketPrefix}/`; | ||
} else { | ||
url = "/"; | ||
baseUrl = "/"; | ||
} | ||
const fullUrl = `https://${bucketName}${baseUrl}`; | ||
|
||
// Two env vars as PUBLIC_URL seems to be blank when running jest even if we set it. | ||
console.log(`PUBLIC_URL=${url}`); | ||
console.log(`E2E_PUBLIC_URL=${url}`); | ||
console.log(`PUBLIC_URL=${baseUrl}`); | ||
console.log(`E2E_PUBLIC_URL=${baseUrl}`); | ||
// This is used for og:url and similar. Not quite right for review domain but we don't really care. | ||
console.log(`VITE_FULL_URL=${fullUrl}`); |