Compare commits

...

59 commits
0.3.1 ... main

Author SHA1 Message Date
5c22207f0a CI: build ts 2025-06-28 03:40:22 +02:00
034d9d4c37 0.4.5
Some checks failed
ci/woodpecker/tag/build Pipeline failed
2025-06-28 03:19:56 +02:00
14363c721b CI: use debian based builder 2025-06-28 03:19:46 +02:00
20bfd3116e 0.4.4
Some checks failed
ci/woodpecker/tag/build Pipeline failed
2025-06-28 02:47:14 +02:00
b6c4cd280a CI: force pull builder 2025-06-28 02:47:04 +02:00
f5828ae1e6 0.4.3
Some checks failed
ci/woodpecker/tag/build Pipeline failed
2025-06-28 02:41:52 +02:00
674fd71de9 CI: use pnpm-python builder 2025-06-28 02:41:27 +02:00
fd9dc302cb Get version from package.json 2025-06-28 02:40:57 +02:00
780bf3b6c9 0.4.2
Some checks failed
ci/woodpecker/tag/build Pipeline failed
2025-06-28 00:50:07 +02:00
3874e84a6e Remove CI artifact for version 2025-06-28 00:49:54 +02:00
00767ac20b 0.4.1
Some checks failed
ci/woodpecker/tag/build Pipeline failed
2025-06-28 00:47:59 +02:00
4caf0cf44f CI: switch to Woodpecker 2025-06-28 00:47:43 +02:00
cd5093899f Cleanup 2025-06-28 00:44:48 +02:00
af559b7faa Cleanup 2025-06-28 00:44:42 +02:00
9531634c62 Merge pull request 'Update README' (#3) from phil/treetrail-frontend:doc into main
All checks were successful
/ build (push) Successful in 23s
Reviewed-on: #3
2024-12-12 13:48:09 +00:00
48ee872208 Update README 2024-12-12 14:45:35 +01:00
b2a3feb58c Update README 2024-12-08 13:34:12 +01:00
1a061e3f20 CI: build container with version and latest tags
All checks were successful
/ build (push) Successful in 26s
2024-12-06 20:16:00 +01:00
63c980095e CI: publish container with tag latest along with the version
Some checks failed
/ build (push) Failing after 24s
2024-12-06 20:10:07 +01:00
d72ea0da6f CI: add token auth to NPM registry
All checks were successful
/ build (push) Successful in 25s
2024-12-06 06:15:06 +01:00
b726fb1daa Cosmetic
Some checks failed
/ build (push) Failing after 22s
2024-12-06 05:59:15 +01:00
db769c70ae CI: set version dynamically fix
Some checks failed
/ build (push) Failing after 21s
2024-12-06 05:48:04 +01:00
6aaf93b098 CI: set version dynamically
Some checks failed
/ build (push) Failing after 20s
2024-12-06 05:43:54 +01:00
ed1a9242c9 Remove private in package.json 2024-12-06 05:34:44 +01:00
fd6e67b332 Add my registry to package.json fix 2024-12-06 05:33:34 +01:00
6949d96117 Add my registry to package.json 2024-12-06 05:31:22 +01:00
1bf7ef7e28 Update .gitignore 2024-12-06 05:30:05 +01:00
4ed8fc7d55 Update registry for CI
All checks were successful
/ build (push) Successful in 23s
2024-12-05 18:51:22 +01:00
8c272ab6ff CI: add app version
Some checks failed
/ build (push) Failing after 24s
2024-11-09 02:32:42 +01:00
b2c5a9062e Display frontend version in settings
All checks were successful
/ build (push) Successful in 24s
2024-11-09 00:32:19 +01:00
a1bb5b1e3a Merge branch 'main' 2024-11-08 23:54:39 +01:00
5409616530 Add client version
All checks were successful
/ build (push) Successful in 22s
2024-11-08 23:52:10 +01:00
839159e59a 0.0.3
All checks were successful
/ build (push) Successful in 24s
2024-11-05 13:11:56 +01:00
08a5d07c4d 0.0.2
All checks were successful
/ build (push) Successful in 24s
2024-11-05 13:09:17 +01:00
d343f413e3 0.0.1
All checks were successful
/ build (push) Successful in 28s
2024-11-05 13:07:56 +01:00
73430a0fe9 CI: clean 2024-11-05 13:07:41 +01:00
963d3437c0 Frontend version: disable - method to be polished
All checks were successful
/ build (push) Successful in 27s
2024-11-04 03:49:11 +01:00
c4c5fd9f11 CI: build container when the version is a clean git tag 17
All checks were successful
/ build (push) Successful in 27s
2024-11-03 18:59:22 +01:00
41697d0290 CI: build container when the version is a clean git tag 16
All checks were successful
/ build (push) Successful in 21s
2024-11-03 18:58:37 +01:00
3252d2c940 CI: build container when the version is a clean git tag 15
All checks were successful
/ build (push) Successful in 20s
2024-11-03 18:54:42 +01:00
db7b2ef6e0 CI: build container when the version is a clean git tag 14
Some checks failed
/ build (push) Failing after 21s
2024-11-03 18:53:59 +01:00
cc7256dbad CI: build container when the version is a clean git tag 12
Some checks failed
/ build (push) Failing after 20s
2024-11-03 18:51:49 +01:00
cff2d0f5eb CI: build container when the version is a clean git tag 12
Some checks failed
/ build (push) Failing after 21s
2024-11-03 18:50:39 +01:00
7e38cf9b46 CI: build container when the version is a clean git tag 11
Some checks failed
/ build (push) Failing after 21s
2024-11-03 18:44:21 +01:00
bcb9807f6f CI: build container when the version is a clean git tag 10
Some checks failed
/ build (push) Failing after 21s
2024-11-03 18:40:36 +01:00
8994329deb CI: build container when the version is a clean git tag 9
Some checks failed
/ build (push) Failing after 23s
2024-11-03 18:40:09 +01:00
eecb3b98c4 CI: build container when the version is a clean git tag 8
Some checks failed
/ build (push) Failing after 21s
2024-11-03 18:31:25 +01:00
3fc7a60bc5 CI: build container when the version is a clean git tag 7
Some checks failed
/ build (push) Failing after 21s
2024-11-03 18:29:57 +01:00
5ff4f33a01 CI: build container when the version is a clean git tag 6
Some checks failed
/ build (push) Failing after 21s
2024-11-03 18:28:35 +01:00
c9768a4040 CI: build container when the version is a clean git tag 5
Some checks failed
/ build (push) Failing after 20s
2024-11-03 16:27:07 +01:00
a6f3e3c800 CI: build container when the version is a clean git tag 4
Some checks failed
/ build (push) Failing after 21s
2024-11-03 16:21:16 +01:00
4f8c764fbe CI: build container when the version is a clean git tag 3
Some checks failed
/ build (push) Failing after 21s
2024-11-03 16:19:52 +01:00
7f037dcbf8 CI: build container when the version is a clean git tag 2
All checks were successful
/ build (push) Successful in 22s
2024-11-03 16:09:54 +01:00
c3cbafbae3 CI: build container when the version is a clean git tag 1
All checks were successful
/ build (push) Successful in 21s
2024-11-03 16:06:44 +01:00
b77ae05fcf Merge branch 'main'
All checks were successful
/ build (push) Successful in 22s
2024-11-03 15:55:13 +01:00
4cafbd7a0a CI: build container when the version is a clean git tag 2024-11-03 15:55:03 +01:00
df802c24a0 CI: force OCI image, label it
All checks were successful
/ build (push) Successful in 21s
2024-11-03 02:50:12 +01:00
aacf0f535b CI: unshallow the runner's repo to get the version for building container
All checks were successful
/ build (push) Successful in 21s
2024-11-02 22:31:30 +01:00
9a0406d9e8 CI: make building container image optional; tag it with the git version
All checks were successful
/ build (push) Successful in 20s
2024-11-02 18:41:14 +01:00
18 changed files with 99 additions and 70 deletions

View file

@ -1,52 +0,0 @@
on:
push:
jobs:
build:
runs-on: container
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build package (transpile ts => js)
run: ng build
- name: Build container
uses: actions/buildah-build@v1
with:
image: treetrail-frontend
#tags: foo # v1 ${{ github.sha }}
containerfiles: |
./Containerfile
- name: Workaround for bug of podman-login
run: |
mkdir -p $HOME/.docker
echo "{ \"auths\": {} }" > $HOME/.docker/config.json
- name: Log in to container registry (with another workaround)
uses: actions/podman-login@v1
with:
registry: ${{ vars.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
auth_file_path: /tmp/auth.json
- uses: actions/push-to-registry@v2
with:
registry: "docker://${{ vars.REGISTRY }}"
image: treetrail-frontend
tags: latest

2
.gitignore vendored
View file

@ -44,3 +44,5 @@ testem.log
# System Files # System Files
.DS_Store .DS_Store
Thumbs.db Thumbs.db
.npmrc

50
.woodpecker/build.yaml Normal file
View file

@ -0,0 +1,50 @@
when:
- event: manual
- event: tag
#depends_on:
#- test
steps:
npm:
image: code.philo.ydns.eu/philorg/pnpm-deb
environment:
ORG: philorg
REGISTRY_TOKEN:
from_secret: registry_token
volumes:
- pnpm:/root/.local/share/pnpm
commands:
- pnpm install --frozen-lockfile
- pnpm set "//code.philo.ydns.eu/api/packages/$ORG/npm/:_authToken=$REGISTRY_TOKEN"
- pnpm publish --no-git-checks
failure: ignore
build:
image: code.philo.ydns.eu/philorg/pnpm-deb
commands:
- pnpm build
build_publish:
image: quay.io/podman/stable:latest
# Caution: This image is built daily. It might fill up your image store quickly.
#pull: true
volumes:
- containers:/var/lib/containers
- pnpm:/root/.local/share/pnpm
# Fill in the trusted checkbox in Woodpecker's settings as well
privileged: true
environment:
registry: code.philo.ydns.eu
org: philorg
container_name: treetrail-frontend
registry_token:
from_secret: registry_token
commands:
# Login at the registry
- podman login -u __token__ --password $registry_token $registry
# Build the container image
- podman build --volume=/var/lib/containers:/var/lib/containers --tag $registry/$org/$container_name:latest --tag $registry/$org/$container_name:$CI_COMMIT_TAG .
# Push the image
- podman push $registry/$org/$container_name:latest
- podman push $registry/$org/$container_name:$CI_COMMIT_TAG

View file

@ -1 +1,10 @@
Front-end for *Tree Trail*, a fun and pedagogic tool to discover the trails and trees around. # Treetrail web front-end
Front-end for *Tree Trail*, a fun and pedagogic tool
to discover the trails and trees around.
Home page (source, bugs, etc):
<https://code.philo.ydns.eu/philorg/treetrail-frontend> .
The main documentation for Tree Trail is:
<https://code.philo.ydns.eu/philorg/treetrail-backend> .

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
@ -20,6 +23,11 @@
args: args:
chdir: "{{ playbook_dir }}" chdir: "{{ playbook_dir }}"
- name: Update version.json
command: pnpm run version
args:
chdir: "{{ playbook_dir }}"
- name: Build frontend container - name: Build frontend container
containers.podman.podman_image: containers.podman.podman_image:
name: "treetrail-frontend:{{ version.stdout }}" name: "treetrail-frontend:{{ version.stdout }}"
@ -28,8 +36,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 }}"

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "treetrail", "name": "treetrail",
"version": "0.0.0", "version": "0.4.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "treetrail", "name": "treetrail",
"version": "0.0.0", "version": "0.4.5",
"dependencies": { "dependencies": {
"@angular/animations": "^18.2.6", "@angular/animations": "^18.2.6",
"@angular/cdk": "^18.2.6", "@angular/cdk": "^18.2.6",

View file

@ -1,15 +1,14 @@
{ {
"name": "treetrail", "name": "treetrail-frontend",
"version": "0.0.0", "version": "0.4.5",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json --port 4201 --serve-path /treetrail", "start": "ng serve --proxy-config proxy.conf.json --port 4201 --serve-path /treetrail --host 0.0.0.0",
"build": "ng build", "build": "ng build",
"watch": "ng build --watch --configuration development", "watch": "ng build --watch --configuration development",
"test": "ng test", "test": "ng test",
"openapi-ts": "openapi-ts" "openapi-ts": "openapi-ts"
}, },
"private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^18.2.6", "@angular/animations": "^18.2.6",
"@angular/cdk": "^18.2.6", "@angular/cdk": "^18.2.6",
@ -61,5 +60,8 @@
"karma-jasmine-html-reporter": "^2.1.0", "karma-jasmine-html-reporter": "^2.1.0",
"typescript": "~5.4.5" "typescript": "~5.4.5"
}, },
"packageManager": "pnpm@9.12.2" "packageManager": "pnpm@9.12.2",
"publishConfig": {
"registry": "http://code.philo.ydns.eu/api/packages/philorg/npm/"
}
} }

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,7 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core'
import { ConfigService } from '../config.service' import { ConfigService } from '../config.service'
import packageJson from '../../../package.json'
@Component({ @Component({
selector: 'app-about', selector: 'app-about',
@ -12,6 +13,8 @@ export class AboutComponent implements OnInit {
public configService: ConfigService, public configService: ConfigService,
) { } ) { }
public version: string = packageJson.version
ngOnInit(): void { ngOnInit(): void {
} }
} }

View file

@ -1,5 +1,7 @@
import { Component, OnInit, import {
ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core' Component, OnInit,
ChangeDetectorRef, ChangeDetectionStrategy
} from '@angular/core'
import { DataService } from './data.service' import { DataService } from './data.service'
import { ActionService } from './action.service' import { ActionService } from './action.service'
@ -10,7 +12,6 @@ import { combineLatest } from 'rxjs'
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class AppComponent implements OnInit { export class AppComponent implements OnInit {
@ -20,7 +21,7 @@ export class AppComponent implements OnInit {
public actionService: ActionService, public actionService: ActionService,
public appUpdateService: AppUpdateService, public appUpdateService: AppUpdateService,
public cdr: ChangeDetectorRef, public cdr: ChangeDetectorRef,
) {} ) { }
title = 'treetrail' title = 'treetrail'
ngOnInit(): void { ngOnInit(): void {

View file

@ -3,7 +3,6 @@ import { Component } from '@angular/core';
@Component({ @Component({
selector: 'app-profile', selector: 'app-profile',
templateUrl: './profile.component.html', templateUrl: './profile.component.html',
styleUrls: ['./profile.component.scss']
}) })
export class ProfileComponent { export class ProfileComponent {

View file

@ -108,7 +108,7 @@
<li><span class='h'>Dave Storey</span>: communication</li> <li><span class='h'>Dave Storey</span>: communication</li>
</ul> </ul>
<p><span class='h'>Contact</span>: phil.treetrail at philome.mooo.com</p> <p><span class='h'>Contact</span>: phil.treetrail at philome.mooo.com</p>
<p><span class='h'>Version</span>: {{conf.bootstrap?.client.version }}</p> <p><span class='h'>Version</span>: {{conf.bootstrap?.client.version }}, frontend: {{ version }}</p>
</mat-expansion-panel> </mat-expansion-panel>
<mat-expansion-panel> <mat-expansion-panel>

View file

@ -3,6 +3,7 @@ import { Router } from '@angular/router'
import { ActionService } from '../action.service' import { ActionService } from '../action.service'
import { ConfigService, Config } from '../config.service' import { ConfigService, Config } from '../config.service'
import packageJson from '../../../package.json'
@Component({ @Component({
selector: 'app-settings', selector: 'app-settings',
@ -17,6 +18,8 @@ export class SettingsComponent implements OnInit {
public router: Router, public router: Router,
) { } ) { }
public version: string = packageJson.version
ngOnInit(): void { ngOnInit(): void {
this.configService.conf.subscribe( this.configService.conf.subscribe(
conf => this.conf = conf conf => this.conf = conf

View file

View file

View file

@ -15,6 +15,8 @@
"importHelpers": true, "importHelpers": true,
"target": "ES2022", "target": "ES2022",
"module": "es2020", "module": "es2020",
//"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"lib": [ "lib": [
"es2019", "es2019",
"dom" "dom"