Add deployed-version info: VERSION_D at /static/VERSION_D (#813) - #1477
Open
Kasinhou wants to merge 3 commits into
Open
Add deployed-version info: VERSION_D at /static/VERSION_D (#813)#1477Kasinhou wants to merge 3 commits into
Kasinhou wants to merge 3 commits into
Conversation
…_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>
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 branch had none of the mechanism, so the full feature is ported fromdtq-dev.Changes
scripts/sourceversion.py— generatessrc/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>fromstatic-files/<name>.html.src/app/shared/utils/clarin-safehtml.pipe.ts—dsSafeHtmlpipe (required by the template) registered inSharedModule.angular.json— registersrc/static-filesbuild asset.src/app/app-routing.module.ts— register the/staticroute.en/csi18n —static-page.404.*strings.Verification
ng buildcompiles;dist/browser/static-files/VERSION_D.htmlis produced./static/VERSION_Drenders the deployed-commit info.🤖 Generated with Claude Code