From 963d3437c086877beb21ad17811bd9371a6d2a50 Mon Sep 17 00:00:00 2001 From: phil Date: Mon, 4 Nov 2024 03:49:11 +0100 Subject: [PATCH] Frontend version: disable - method to be polished --- build.yaml | 9 +++++++-- src/app/about/about.component.html | 2 +- src/app/about/about.component.ts | 6 +++++- tsconfig.json | 3 +++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/build.yaml b/build.yaml index 0ed0cf8..8b195eb 100644 --- a/build.yaml +++ b/build.yaml @@ -1,8 +1,11 @@ -- name: Build container +- name: Build container image hosts: localhost gather_facts: false vars: repository: tiptop:5000 + force_rm: false + cache: false + tasks: - name: Install dependencies command: pnpm install @@ -28,8 +31,10 @@ path: "{{ playbook_dir }}" build: format: oci - cache: no + force_rm: "{{ force_rm }}" + cache: "{{ cache }}" file: Containerfile + extra_args: "--build-arg APP_VERSION={{ version.stdout }}" push: true push_args: dest: "{{ repository }}/treetrail-frontend:{{ version.stdout }}" diff --git a/src/app/about/about.component.html b/src/app/about/about.component.html index c7e6ba7..358852a 100644 --- a/src/app/about/about.component.html +++ b/src/app/about/about.component.html @@ -4,7 +4,7 @@

Version

-

Client: {{ (configService.conf | async).bootstrap.client.version }}>

+

Server: {{ (configService.conf | async).bootstrap.server.version }}

\ No newline at end of file diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts index edfc557..79f29cb 100644 --- a/src/app/about/about.component.ts +++ b/src/app/about/about.component.ts @@ -1,6 +1,8 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit } from '@angular/core' import { ConfigService } from '../config.service' +// TODO: get the dynamic version from the git tags +//import packageJson from '../../../package.json' @Component({ selector: 'app-about', @@ -12,6 +14,8 @@ export class AboutComponent implements OnInit { public configService: ConfigService, ) { } + //public version: string = packageJson.version + ngOnInit(): void { } } diff --git a/tsconfig.json b/tsconfig.json index 78cbf2f..51a9bd8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,9 @@ "importHelpers": true, "target": "ES2022", "module": "es2020", + // TODO: get the dynamic version from the git tags + //"allowSyntheticDefaultImports": true, + //"resolveJsonModule": true, "lib": [ "es2019", "dom"