Skip to content

Commit f61099a

Browse files
committed
Merge branch 'release/2.9.0'
2 parents a407276 + 50c7da7 commit f61099a

File tree

87 files changed

+1511
-516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1511
-516
lines changed

.github/workflows/docker.image.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,37 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313
- name: Get Tag Version
1414
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
1515
- name: DockerHub Login
16-
uses: docker/login-action@v1.10.0
16+
uses: docker/login-action@v3
1717
with:
1818
username: ${{ secrets.DOCKERHUB_USERNAME }}
1919
password: ${{ secrets.DOCKERHUB_TOKEN }}
2020
- name: Docker Setup QEMU
21-
uses: docker/setup-qemu-action@v1.2.0
21+
uses: docker/setup-qemu-action@v3
2222
with:
2323
platforms: arm,arm64,amd64
2424
- name: Docker Setup Buildx
25-
uses: docker/setup-buildx-action@v1.6.0
25+
uses: docker/setup-buildx-action@v3
2626
- name: Build & Push Docker image (Latest)
2727
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/')
28-
run: docker buildx build . --file Dockerfile -t kcapp/frontend:latest --platform=linux/arm,linux/arm64,linux/amd64 --push
28+
run: |
29+
docker buildx build . \
30+
--file Dockerfile \
31+
--cache-from=type=registry,ref=kcapp/frontend:cache \
32+
--cache-to=type=registry,ref=kcapp/frontend:cache,mode=max \
33+
-t kcapp/frontend:latest \
34+
--platform=linux/arm,linux/arm64,linux/amd64 \
35+
--push
2936
- name: Build & Push Docker image (Release version)
3037
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
31-
run: docker buildx build . --file Dockerfile -t kcapp/frontend:${{ env.RELEASE_VERSION }} --platform=linux/arm,linux/arm64,linux/amd64 --push
38+
run: |
39+
docker buildx build . \
40+
--file Dockerfile \
41+
--cache-from=type=registry,ref=kcapp/frontend:cache \
42+
--cache-to=type=registry,ref=kcapp/frontend:cache,mode=max \
43+
-t kcapp/frontend:${{ env.RELEASE_VERSION }} \
44+
--platform=linux/arm,linux/arm64,linux/amd64 \
45+
--push

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,6 @@ public/images/players
8282

8383
# Ignore SQL files
8484
*.sql
85+
86+
# Ignore version files
87+
version.json

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
# Changelog
22
A preview of major changes can be found in the Wiki ([Latest Changes](https://github.com/kcapp/frontend/wiki/Latest_Changes))
33

4+
## [2.9.0] - 2025-04-06
5+
#### Feature
6+
- Option to see `All` or `Unique` tournament statistics per player
7+
- Ability to "Remote Start" matches on a selected venue
8+
- Split tournaments into "Tournaments" and "Seasons"
9+
- Persist "Enable Voice Announcements" on spectate page
10+
- Added totals view per group to Tournament Overview
11+
- Inactive players can now be added via ID from the home page
12+
- "King Slayer" badge!
13+
- New Leaderboard page
14+
- About page showing current versions
15+
16+
#### Changed
17+
- Include Git commit on kcapp developer badge
18+
- Updated to latest version of dependencies
19+
- Update to NodeJS `22`
20+
21+
#### Fixed
22+
- Issue with the `TTS` gets stuck in certain situations
23+
- Bug where matches were not correctly forwarded back to main screen
24+
- Minor UI improvements
25+
426
## [2.8.0] - 2024-12-11
527
#### Feature
628
- New game type `170`
@@ -231,6 +253,7 @@ A preview of major changes can be found in the Wiki ([Latest Changes](https://gi
231253
- Multiple score entry methods
232254
- Including [Unicorn Smartboard](https://github.com/kcapp/smartboard)
233255

256+
[2.9.0]: https://github.com/kcapp/frontend/compare/v2.8.0...v2.9.0
234257
[2.8.0]: https://github.com/kcapp/frontend/compare/v2.7.0...v2.8.0
235258
[2.7.0]: https://github.com/kcapp/frontend/compare/v2.6.0...v2.7.0
236259
[2.6.0]: https://github.com/kcapp/frontend/compare/v2.5.0...v2.6.0

Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Create our build image
2-
FROM node:18-alpine AS BUILD_IMAGE
2+
# Must be node-18, ref https://github.com/docker/build-push-action/issues/1071
3+
FROM node:18-alpine AS build_image
34

45
# Add git and curl
56
RUN apk update && apk add --no-cache git curl
@@ -14,13 +15,16 @@ RUN npm install --only=production
1415
# Bundle app source
1516
COPY . .
1617

18+
# Write version info into version.json
19+
RUN node bin/write-version.js
20+
1721
# Create actual image
18-
FROM node:18-alpine
22+
FROM node:22-alpine
1923

2024
WORKDIR /usr/src/kcapp
2125

2226
# Copy required files from build image
23-
COPY --from=BUILD_IMAGE /usr/src/kcapp /usr/src/kcapp
27+
COPY --from=build_image /usr/src/kcapp /usr/src/kcapp
2428

2529
EXPOSE 3000
2630
CMD [ "npm", "run", "docker" ]

app.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ app.locals.kcapp = {};
4545
app.locals.kcapp.api = process.env.KCAPP_API || 'http://localhost:8001';
4646
app.locals.kcapp.api_path = process.env.KCAPP_API_PATH || ':8001';
4747
app.locals.kcapp.local_admin = process.env.KCAPP_LOCAL_ADMIN ? process.env.KCAPP_LOCAL_ADMIN === "true" : true;
48+
app.locals.serializedGlobals = { kcapp: true };
4849

4950
// Create all routes
5051
const socketHandler = require('./routes/lib/socketio_handler')(io, app);
@@ -63,9 +64,6 @@ const venues = require('./routes/venues')(app, socketHandler);
6364
const badges = require('./routes/badges');
6465
socketHandler.setupActiveNamespace();
6566

66-
app.locals.moment = require('moment');
67-
app.locals._ = require('underscore');
68-
6967
// Write access log to a daily rotated file in /log
7068
const pad = num => (num > 9 ? "" : "0") + num;
7169
const generator = (time, index) => {

bin/write-version.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const fs = require('fs');
2+
const { execSync } = require('child_process');
3+
const packageJson = require('../package.json');
4+
5+
const version = packageJson.version;
6+
let git_commit = 'unknown';
7+
8+
try {
9+
git_commit = execSync('git rev-parse --short HEAD').toString().trim();
10+
} catch (e) {
11+
console.error('Could not get git commit hash', e);
12+
}
13+
14+
const versionInfo = { version, git_commit };
15+
fs.writeFileSync('./version.json', JSON.stringify(versionInfo, null, 2));

0 commit comments

Comments
 (0)