Add deployed-version info: VERSION_D at /static/VERSION_D (#813) - #1478
Open
Kasinhou wants to merge 3 commits into
Open
Add deployed-version info: VERSION_D at /static/VERSION_D (#813)#1478Kasinhou wants to merge 3 commits into
Kasinhou wants to merge 3 commits into
Conversation
…_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>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why (issue #813)
Every customer should be able to see which commit is currently deployed (served at
/static/VERSION_D, as ondtq-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/15dtq-devmodule.Changes
scripts/sourceversion.py— generatessrc/static-files/VERSION_D.htmlat Docker build time..github/workflows/docker.yml— enablerun_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>fromstatic-files/<name>.html(content fetched client-side; SSR-safe).src/app/shared/html-content.service.ts—providedIn: 'root'service with locale fallback.src/app/shared/utils/clarin-safehtml.pipe.ts— standalonedsSafeHtmlpipe.angular.json— registersrc/static-filesbuild asset.src/app/app-routes.ts— register the/staticroute.en/csi18n —static-page.404.*strings.Verification
ng buildcompiles;/static/VERSION_Drenders the deployed-commit info.🤖 Generated with Claude Code