Add version information to the build and make it accessible through a Service
The goal here is to add build information to the app, the problem is, I have no clear idea how to do that :D
Here's the information I would like to access:
- App Variant
- Version (release tag)
There are two parts to this, that can probably be done independently.
RccBuildService
Create a json file (say build_info.json) at the repo root with dummy information in it. Somehow get RccBuildService to access it. If need be we use ìmport build_info from '../../ [...] /../build_info.json
– but hopefully there is a better way: Maybe angular.json can distribute files from the root dir into the various project folders?
App variant: We could just set this value in the respective features.module, but maybe we can access the project name from angular.json, so that we do not have multiple places where this info is stored?
Get the data from the build
Write build information during the build into build_info.json.
Requirements
-
Create RccBuildService that logs the release tag and app variant to the console when the app loads in the browser. (using dummy info from a file at root dir, where/if needed)
-
Either: Update gitlab-cli.yml to update the file that holds the dummy info.
-
OR: Write an issue to update gitlab-cli.yml such that the file used for RccBuildService gets the information you need on build.