Compare commits

...

4 Commits

Author SHA1 Message Date
Jesse Mazzella
49906b8b41 Merge branch 'master' into mct7558 2024-03-14 10:57:54 -07:00
Jesse Mazzella
70e2c93263 chore: adjust warning 2024-03-06 16:48:29 -08:00
Jesse Mazzella
a141dc28e5 docs: make it clear it's a warning 2024-03-06 16:40:33 -08:00
Jesse Mazzella
345584ec3e fix(webpack): handle git errors gracefully and clearly 2024-03-06 16:33:01 -08:00

View File

@@ -15,6 +15,9 @@ import CopyWebpackPlugin from 'copy-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import { VueLoaderPlugin } from 'vue-loader';
import webpack from 'webpack';
const REV_PARSE_ERROR =
'[WARN]: Failed to retrieve Git commit metadata. This might indicate that the script is not running within a Git repository. Error details:';
let gitRevision = 'error-retrieving-revision';
let gitBranch = 'error-retrieving-branch';
@@ -24,7 +27,9 @@ try {
gitRevision = execSync('git rev-parse HEAD').toString().trim();
gitBranch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
} catch (err) {
console.warn(err);
console.warn(`${REV_PARSE_ERROR}
"${err}"
Continuing...`);
}
const projectRootDir = fileURLToPath(new URL('../', import.meta.url));