Skip to content

Add deployed-version info: VERSION_D at /static/VERSION_D (#813) - #1477

Merged
milanmajchrak merged 4 commits into
customer/TULfrom
deployed-version-info/TUL
Aug 26, 2026
Merged

Add deployed-version info: VERSION_D at /static/VERSION_D (#813)#1477
milanmajchrak merged 4 commits into
customer/TULfrom
deployed-version-info/TUL

Conversation

@Kasinhou

Copy link
Copy Markdown

What & why (issue #813)

Every customer should be able to see which commit is currently deployed (served at /static/VERSION_D, as on dtq-dev). This branch had none of the mechanism, so the full feature is ported from dtq-dev.

Changes

  • scripts/sourceversion.py — generates src/static-files/VERSION_D.html (git hash, commit date, build-run + release links) at Docker build time.
  • .github/workflows/docker.yml — new Add version step runs the script before the image build.
  • src/app/static-page/* + src/app/shared/html-content.service.ts — static-page module that renders /static/<name> from static-files/<name>.html.
  • src/app/shared/utils/clarin-safehtml.pipe.tsdsSafeHtml pipe (required by the template) registered in SharedModule.
  • angular.json — register src/static-files build asset.
  • src/app/app-routing.module.ts — register the /static route.
  • en/cs i18n — static-page.404.* strings.

Verification

  • ng build compiles; dist/browser/static-files/VERSION_D.html is produced.
  • /static/VERSION_D renders the deployed-commit info.

🤖 Generated with Claude Code

Matus Kasak and others added 3 commits August 20, 2026 15:25
…_D (#813)

Port the deployed-commit info feature from dtq-dev so this instance can show
which commit is currently deployed:
- scripts/sourceversion.py generates src/static-files/VERSION_D.html (git hash,
  commit date, build-run link) at Docker build time.
- .github/workflows/docker.yml runs the version script before the image build.
- Static-page module + HtmlContentService serve /static/<name> from static-files/.
- ClarinSafeHtmlPipe (dsSafeHtml) ported and registered in SharedModule (needed
  by the static-page template).
- angular.json registers src/static-files as a build asset.
- app-routing.module.ts registers the /static route.
- en/cs i18n: static-page.404.* strings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…813)

TUL/jcu had no src/static-files directory. The CI 'Add version' step redirects
into src/static-files/VERSION_D.html and angular.json ships src/static-files as
a build asset, both of which require the directory to exist. Commit a placeholder
(overwritten at build time) to guarantee it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Only the deployed-version info page should be served, not a full LINDAT-style
static-page set. Restrict the angular.json asset to VERSION_D.html so nothing
else under src/static-files becomes web-accessible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Kasinhou Kasinhou self-assigned this Aug 21, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a mechanism to expose the currently deployed commit/build information via a generated static file (/static/VERSION_D) and introduces a generic Angular route/module for rendering static HTML assets under /static/<name>.

Changes:

  • Generate src/static-files/VERSION_D.html during the GitHub Actions Docker workflow using scripts/sourceversion.py.
  • Add a /static route and a new static-page feature module + HtmlContentService to fetch and render static HTML assets (with i18n 404 messaging).
  • Register a SafeHtml pipe in SharedModule and add build asset configuration for static files.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/static-files/VERSION_D.html Placeholder file to be overwritten at build time with deployed version info
.github/workflows/docker.yml Adds workflow step to generate VERSION_D.html before Docker build
scripts/sourceversion.py New generator script emitting git/build/release info as HTML
angular.json Registers static-files assets for inclusion in the build output
src/app/app-routing.module.ts Adds lazy-loaded /static route
src/app/static-page/static-page.module.ts New module wiring for static-page feature
src/app/static-page/static-page-routing.module.ts Child routes for static-page rendering
src/app/static-page/static-page-routing-paths.ts Constants for static routing/static asset paths
src/app/static-page/static-page.component.ts Component that loads static HTML and handles relative-link navigation
src/app/static-page/static-page.component.html Template rendering static HTML with loading and 404 states
src/app/static-page/static-page.component.scss Styles placeholder for static-page component
src/app/static-page/static-page.component.spec.ts Unit tests for static-page behavior (loading, 404 state, link rewriting)
src/app/shared/html-content.service.ts New service to fetch static HTML with locale + SSR-aware URL composition
src/app/shared/html-content.service.spec.ts Unit tests for HtmlContentService locale/namespacing behavior
src/app/shared/utils/clarin-safehtml.pipe.ts New pipe used by template to render HTML via [innerHTML]
src/app/shared/shared.module.ts Registers the new SafeHtml pipe in SharedModule
src/assets/i18n/en.json5 Adds static-page 404 strings (EN)
src/assets/i18n/cs.json5 Adds static-page 404 strings (CS)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/app/static-page/static-page.component.ts
Comment thread src/app/static-page/static-page.component.ts
Comment thread src/app/static-page/static-page.component.ts
Comment thread src/app/shared/html-content.service.ts
Comment thread src/app/shared/utils/clarin-safehtml.pipe.ts
Comment thread scripts/sourceversion.py
Comment thread angular.json
Comment thread src/app/static-page/static-page-routing-paths.ts
@Kasinhou
Kasinhou requested a review from milanmajchrak August 24, 2026 11:31
@milanmajchrak
milanmajchrak merged commit 5772d97 into customer/TUL Aug 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants