add version number to publish task

This commit is contained in:
Matt Walsh
2025-11-10 04:52:13 +00:00
parent 1c79b08228
commit 8255efd3f7
3 changed files with 10 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ import TerserPlugin from 'terser-webpack-plugin';
import { readFile } from 'fs/promises'; import { readFile } from 'fs/promises';
import file from 'gulp-file'; import file from 'gulp-file';
import { CloudFrontClient, CreateInvalidationCommand } from '@aws-sdk/client-cloudfront'; import { CloudFrontClient, CreateInvalidationCommand } from '@aws-sdk/client-cloudfront';
import log from 'fancy-log';
import OVERRIDES from '../src/overrides.mjs'; import OVERRIDES from '../src/overrides.mjs';
// get cloudfront // get cloudfront
@@ -204,11 +205,15 @@ const buildPlaylist = async () => {
return file('playlist.json', JSON.stringify(playlist)).pipe(dest('./dist')); return file('playlist.json', JSON.stringify(playlist)).pipe(dest('./dist'));
}; };
const logVersion = async () => {
log(`Version Published: ${version}`);
};
const buildDist = series(clean, parallel(buildJs, compressJsVendor, copyCss, compressHtml, copyOtherFiles, copyDataFiles, copyImageSources, buildPlaylist)); const buildDist = series(clean, parallel(buildJs, compressJsVendor, copyCss, compressHtml, copyOtherFiles, copyDataFiles, copyImageSources, buildPlaylist));
// upload_images could be in parallel with upload, but _images logs a lot and has little changes // upload_images could be in parallel with upload, but _images logs a lot and has little changes
// by running upload last the majority of the changes will be at the bottom of the log for easy viewing // by running upload last the majority of the changes will be at the bottom of the log for easy viewing
const publishFrontend = series(buildDist, uploadImages, upload, invalidate); const publishFrontend = series(buildDist, uploadImages, upload, invalidate, logVersion);
const stageFrontend = series(previewVersion, buildDist, uploadImagesPreview, uploadPreview, invalidatePreview); const stageFrontend = series(previewVersion, buildDist, uploadImagesPreview, uploadPreview, invalidatePreview);
export default publishFrontend; export default publishFrontend;

1
package-lock.json generated
View File

@@ -21,6 +21,7 @@
"eslint": "^9.0.0", "eslint": "^9.0.0",
"eslint-config-airbnb-base": "15.0.0", "eslint-config-airbnb-base": "15.0.0",
"eslint-plugin-import": "^2.10.0", "eslint-plugin-import": "^2.10.0",
"fancy-log": "^2.0.0",
"gulp": "^5.0.0", "gulp": "^5.0.0",
"gulp-awspublish": "^8.0.0", "gulp-awspublish": "^8.0.0",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",

View File

@@ -34,6 +34,7 @@
"eslint": "^9.0.0", "eslint": "^9.0.0",
"eslint-config-airbnb-base": "15.0.0", "eslint-config-airbnb-base": "15.0.0",
"eslint-plugin-import": "^2.10.0", "eslint-plugin-import": "^2.10.0",
"fancy-log": "^2.0.0",
"gulp": "^5.0.0", "gulp": "^5.0.0",
"gulp-awspublish": "^8.0.0", "gulp-awspublish": "^8.0.0",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",
@@ -45,14 +46,14 @@
"gulp-sass": "^6.0.0", "gulp-sass": "^6.0.0",
"gulp-terser": "^2.0.0", "gulp-terser": "^2.0.0",
"luxon": "^3.0.0", "luxon": "^3.0.0",
"metar-taf-parser": "^9.0.0",
"nosleep.js": "^0.12.0", "nosleep.js": "^0.12.0",
"sass": "^1.54.0", "sass": "^1.54.0",
"suncalc": "^1.8.0", "suncalc": "^1.8.0",
"swiped-events": "^1.1.4", "swiped-events": "^1.1.4",
"terser-webpack-plugin": "^5.3.6", "terser-webpack-plugin": "^5.3.6",
"webpack": "^5.99.9", "webpack": "^5.99.9",
"webpack-stream": "^7.0.0", "webpack-stream": "^7.0.0"
"metar-taf-parser": "^9.0.0"
}, },
"dependencies": { "dependencies": {
"dotenv": "^17.0.1", "dotenv": "^17.0.1",