Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IDE version to window title. #11446

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [New dropdown-based component menu][11398].
- [Size of Table Input Widget is preserved and restored after project
re-opening][11435]
- [Added application version to the title bar.][11446]

[11151]: https://github.com/enso-org/enso/pull/11151
[11271]: https://github.com/enso-org/enso/pull/11271
Expand All @@ -23,6 +24,7 @@
[11388]: https://github.com/enso-org/enso/pull/11388
[11398]: https://github.com/enso-org/enso/pull/11398
[11435]: https://github.com/enso-org/enso/pull/11435
[11446]: https://github.com/enso-org/enso/pull/11446

#### Enso Standard Library

Expand Down
2 changes: 1 addition & 1 deletion app/common/src/appConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export async function readEnvironmentFromFile() {
if (!isProduction || entries.length > 0) {
Object.assign(process.env, variables)
}
process.env.ENSO_CLOUD_DASHBOARD_VERSION ??= buildInfo.version
process.env.ENSO_CLOUD_DASHBOARD_VERSION ??= buildInfo.version ?? '0.0.1-dev'
Frizi marked this conversation as resolved.
Show resolved Hide resolved
process.env.ENSO_CLOUD_DASHBOARD_COMMIT_HASH ??= buildInfo.commit
} catch (error) {
process.env.ENSO_CLOUD_DASHBOARD_VERSION ??= buildInfo.version
Expand Down
2 changes: 1 addition & 1 deletion app/gui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
maximum-scale = 1.0,
user-scalable = no"
/>
<title>Enso Analytics</title>
<title>Enso %ENSO_IDE_VERSION%</title>
</head>
<body>
<div id="enso-spotlight" class="enso-spotlight"></div>
Expand Down
5 changes: 5 additions & 0 deletions app/gui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ await readEnvironmentFromFile()
const entrypoint =
process.env.E2E === 'true' ? './src/project-view/e2e-entrypoint.ts' : './src/entrypoint.ts'

// NOTE(Frizi): This rename is for the sake of forward compatibility with not yet merged config refactor on bazel branch,
// and because Vite's HTML env replacements only work with import.meta.env variables, not defines.
process.env.ENSO_IDE_VERSION = process.env.ENSO_CLOUD_DASHBOARD_VERSION

// https://vitejs.dev/config/
export default defineConfig({
root: fileURLToPath(new URL('.', import.meta.url)),
Expand Down Expand Up @@ -65,6 +69,7 @@ export default defineConfig({
'#': fileURLToPath(new URL('./src/dashboard', import.meta.url)),
},
},
envPrefix: 'ENSO_IDE_',
define: {
...getDefines(),
IS_CLOUD_BUILD: JSON.stringify(IS_CLOUD_BUILD),
Expand Down
Loading