Skip to content

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

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

Add deployed-version info: VERSION_D at /static/VERSION_D (#813)#1478
milanmajchrak merged 4 commits into
customer/jcufrom
deployed-version-info/jcu

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 is DSpace 9 / Angular 20 (standalone, @angular/ssr), so the feature is implemented natively for that stack rather than copied from the Angular-13/15 dtq-dev module.

Changes

  • scripts/sourceversion.py — generates src/static-files/VERSION_D.html at Docker build time.
  • .github/workflows/docker.yml — enable run_python_version_script / python_version_script_dest (both image jobs) so the reusable build produces the version file.
  • src/app/static-page/* — new standalone component + routes that render /static/<name> from static-files/<name>.html (content fetched client-side; SSR-safe).
  • src/app/shared/html-content.service.tsprovidedIn: 'root' service with locale fallback.
  • src/app/shared/utils/clarin-safehtml.pipe.ts — standalone dsSafeHtml pipe.
  • angular.json — register src/static-files build asset.
  • src/app/app-routes.ts — register the /static route.
  • en/cs i18n — static-page.404.* strings.

Verification

  • ng build compiles; /static/VERSION_D renders the deployed-commit info.

🤖 Generated with Claude Code

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

Implement the deployed-commit info feature for this DSpace 9 / Angular 20
(standalone) instance, mirroring dtq-dev's behaviour:
- 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: enable run_python_version_script (both image jobs)
  so the version file is produced by the reusable build.
- New standalone static-page feature (component + routes + HtmlContentService +
  dsSafeHtml pipe) renders /static/<name> from static-files/<name>.html; content is
  fetched client-side (SSR-safe). VERSION_D is reachable at /static/VERSION_D.
- angular.json registers src/static-files as a build asset.
- app-routes.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>
…no alias) (#813)

- angular.json: restrict the static-files asset to VERSION_D.html so only
  /static/VERSION_D is served (not a full static-page set).
- html-content.service.ts: drop the 'of as observableOf' alias (alias-imports rule).
- app-routes.ts / static-page.component.ts: sort imports (simple-import-sort,
  sort-standalone-imports).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Kasinhou Kasinhou self-assigned this Aug 21, 2026
Remove issue-tracker references and extra explanatory comments from the
frontend deployed-version files, aligning comment style with dtq-dev, and
drop the redundant explicit 'standalone: true' on the pipe (default in Angular 20).

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 build-generated “deployed version” page and a generic /static/:id route to render HTML assets from static-files, so deployments can expose commit/build metadata at /static/VERSION_D.

Changes:

  • Add scripts/sourceversion.py and enable it in the reusable Docker build to generate src/static-files/VERSION_D.html during image builds.
  • Add a new static-page route + component and an HtmlContentService to fetch static-files/<name>.html client-side with locale fallback.
  • Register the static asset + add i18n strings for a dedicated static-page 404 view.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/static-files/VERSION_D.html Placeholder tracked file that will be regenerated at build time.
scripts/sourceversion.py Generates the deployed commit/build HTML output for VERSION_D.html.
.github/workflows/docker.yml Enables version-file generation via reusable Docker workflow inputs.
angular.json Adds static-files content to Angular build assets.
src/app/app-routes.ts Registers the /static route to lazy-load static-page routes.
src/app/static-page/static-page-routing-paths.ts Route/path constants for the static-page feature.
src/app/static-page/static-page-routes.ts Route config for /static/:id.
src/app/static-page/static-page.component.ts Loads and renders static HTML content; sets 404 UI/state.
src/app/static-page/static-page.component.html Template for loading/found/not-found states.
src/app/static-page/static-page.component.scss Styles for the not-found view.
src/app/shared/html-content.service.ts Fetches localized/fallback static HTML from static-files/.
src/app/shared/utils/clarin-safehtml.pipe.ts Pipe used to render fetched HTML via [innerHTML].
src/assets/i18n/en.json5 Adds new static-page 404 strings (EN).
src/assets/i18n/cs.json5 Adds new 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/assets/i18n/cs.json5
Comment thread src/app/static-page/static-page.component.ts
Comment thread src/app/shared/utils/clarin-safehtml.pipe.ts
Comment thread angular.json
Comment thread scripts/sourceversion.py
Comment thread src/assets/i18n/en.json5
@Kasinhou
Kasinhou requested a review from milanmajchrak August 24, 2026 11:31
@milanmajchrak
milanmajchrak merged commit 28388bb into customer/jcu Aug 26, 2026
6 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