Skip to content

Commit a2992bd

Browse files
committed
🎨Load version information from package.json.
1 parent fe4bdfb commit a2992bd

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

‎helper/scoreSheetPDFLine2-2022.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async function drawRun(doc, config, scoringRun) {
141141
}
142142

143143
// System version
144-
pdf.drawText(doc, 750, 573, 'RCJ Scoring System v20.0', 6, 'black');
144+
pdf.drawText(doc, 742, 573, `RoboCupJunior CMS v${process.env.npm_package_version}`, 6, 'black');
145145

146146
let x = 440;
147147
let y = 35;

‎helper/scoreSheetPDFMaze2-2022.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function drawRun(doc, config, scoringRun) {
174174
);
175175

176176
// System version
177-
pdf.drawText(doc, 745, 573, 'RCJ Scoring System v20.0', 6, 'black');
177+
pdf.drawText(doc, 742, 573, `RoboCupJunior CMS v${process.env.npm_package_version}`, 6, 'black');
178178

179179
const cells = [];
180180
for (const cell of scoringRun.map.cells) {

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "rcj-scoring",
3-
"version": "21.4.33",
3+
"version": "22.0.4",
4+
"copyright": "2016-2021 RCJ-CMS Development Team",
45
"private": true,
56
"scripts": {
67
"start": "node server.js",

‎views/includes/footer.pug‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ footer.footer(style="text-align:center;background-color: #A51931;")
22
.row
33
.col-6.footer-text(style="margin-top:0.2rem;text-align:left;font-size:min(1vw, 25px);")
44
i.far.fa-copyright(aria-hidden='true')
5-
|  2016-2021 RCJ-CMS Development Team - 
5+
|  #{process.env.npm_package_copyright} - 
66
i.fas.fa-code-branch(aria-hidden="true")
7-
|   v22.0.3
7+
|   v#{process.env.npm_package_version}
88
.col-6(style="text-align:right;font-size:min(1.5rem, 25px);")
99
i.fas.fa-language(aria-hidden='true' onclick="location.href='/locales'" ng-cloak)  {{'language_name' | translate}}  

0 commit comments

Comments
 (0)