Frontend version: disable - method to be polished

This commit is contained in:
phil 2024-11-04 03:49:11 +01:00
parent c4c5fd9f11
commit 963d3437c0
4 changed files with 16 additions and 4 deletions

View file

@ -1,8 +1,11 @@
- name: Build container - name: Build container image
hosts: localhost hosts: localhost
gather_facts: false gather_facts: false
vars: vars:
repository: tiptop:5000 repository: tiptop:5000
force_rm: false
cache: false
tasks: tasks:
- name: Install dependencies - name: Install dependencies
command: pnpm install command: pnpm install
@ -28,8 +31,10 @@
path: "{{ playbook_dir }}" path: "{{ playbook_dir }}"
build: build:
format: oci format: oci
cache: no force_rm: "{{ force_rm }}"
cache: "{{ cache }}"
file: Containerfile file: Containerfile
extra_args: "--build-arg APP_VERSION={{ version.stdout }}"
push: true push: true
push_args: push_args:
dest: "{{ repository }}/treetrail-frontend:{{ version.stdout }}" dest: "{{ repository }}/treetrail-frontend:{{ version.stdout }}"

View file

@ -4,7 +4,7 @@
</mat-card-title> </mat-card-title>
<mat-card-content> <mat-card-content>
<h2>Version</h2> <h2>Version</h2>
<p><span class='h'>Client: </span>{{ (configService.conf | async).bootstrap.client.version }}></p> <!--<p><span class='h'>Client: </span>{{ version }}></p>-->
<p><span class='h'>Server: </span>{{ (configService.conf | async).bootstrap.server.version }}</p> <p><span class='h'>Server: </span>{{ (configService.conf | async).bootstrap.server.version }}</p>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>

View file

@ -1,6 +1,8 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core'
import { ConfigService } from '../config.service' import { ConfigService } from '../config.service'
// TODO: get the dynamic version from the git tags
//import packageJson from '../../../package.json'
@Component({ @Component({
selector: 'app-about', selector: 'app-about',
@ -12,6 +14,8 @@ export class AboutComponent implements OnInit {
public configService: ConfigService, public configService: ConfigService,
) { } ) { }
//public version: string = packageJson.version
ngOnInit(): void { ngOnInit(): void {
} }
} }

View file

@ -15,6 +15,9 @@
"importHelpers": true, "importHelpers": true,
"target": "ES2022", "target": "ES2022",
"module": "es2020", "module": "es2020",
// TODO: get the dynamic version from the git tags
//"allowSyntheticDefaultImports": true,
//"resolveJsonModule": true,
"lib": [ "lib": [
"es2019", "es2019",
"dom" "dom"