Skip to content

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

Open
Kasinhou wants to merge 3 commits into
customer/jcufrom
deployed-version-info/jcu
Open

Add deployed-version info: VERSION_D at /static/VERSION_D (#813)#1478
Kasinhou wants to merge 3 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
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.

1 participant