Updates to build info.
This commit is contained in:
parent
eabc10454c
commit
cb811c804c
3 changed files with 31 additions and 27 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "digitalconsumer.iss",
|
"name": "digitalconsumer.iss",
|
||||||
"version": "0.1.0",
|
"version": "1.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"env": {
|
"env": {
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
<!-- Version: <%= __BUILD_INFO__.versionString %> -->
|
<!-- Build Version: <%= __BUILD_INFO__.versionString %> -->
|
||||||
<!-- <%= JSON.stringify(__BUILD_INFO__) %> -->
|
<!-- Build Time: <%= __BUILD_INFO__.buildTimeLocal %> -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,30 +1,6 @@
|
||||||
const { execSync } = require('child_process');
|
const { execSync } = require('child_process');
|
||||||
const pkg = require('./package.json');
|
const pkg = require('./package.json');
|
||||||
|
|
||||||
function safeExec(cmd, fallback = 'unknown') {
|
|
||||||
try {
|
|
||||||
return execSync(cmd).toString().trim();
|
|
||||||
} catch {
|
|
||||||
return fallback;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const buildTime = new Date().toISOString();
|
|
||||||
const buildTimeStamp = Math.floor(Date.now() / 1000);
|
|
||||||
|
|
||||||
const gitInfo = {
|
|
||||||
commit: safeExec('git rev-parse --short HEAD', 'dev'),
|
|
||||||
branch: safeExec('git rev-parse --abbrev-ref HEAD', 'unknown')
|
|
||||||
};
|
|
||||||
|
|
||||||
const buildInfo = {
|
|
||||||
version: pkg.version,
|
|
||||||
buildTime: buildTime,
|
|
||||||
buildTimeStamp: buildTimeStamp,
|
|
||||||
...gitInfo,
|
|
||||||
versionString: `${pkg.version}-${gitInfo.branch}-${gitInfo.commit}-${buildTimeStamp}`
|
|
||||||
};
|
|
||||||
|
|
||||||
process.env.VUE_APP_CONSUMER_CF_DISTRO = 'https://digitalapi.dev.safelite.io';
|
process.env.VUE_APP_CONSUMER_CF_DISTRO = 'https://digitalapi.dev.safelite.io';
|
||||||
process.env.VUE_APP_CURRENT_ENVIRONMENT = 'Localhost';
|
process.env.VUE_APP_CURRENT_ENVIRONMENT = 'Localhost';
|
||||||
process.env.VUE_APP_CUSTOMER_PORTAL_URL = 'https://myaccountdev.safelite.com/';
|
process.env.VUE_APP_CUSTOMER_PORTAL_URL = 'https://myaccountdev.safelite.com/';
|
||||||
|
|
@ -42,6 +18,34 @@ process.env.VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC =
|
||||||
process.env.VUE_APP_GOOGLE_MAPS_API_SCRIPT =
|
process.env.VUE_APP_GOOGLE_MAPS_API_SCRIPT =
|
||||||
"(g=>{var h,a,k,p='The Google Maps JavaScript API',c='google',l='importLibrary',q='__ib__',m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement('script'));e.set('libraries',[...r]+'');for(k in g)e.set(k.replace(/[A-Z]/g,t=>'_'+t[0].toLowerCase()),g[k]);e.set('callback',c+'.maps.'+q);a.src=`https://maps.googleapis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+' could not load.'));a.nonce=m.querySelector('script[nonce]')?.nonce||'';m.head.append(a)}));d[l]?console.warn(p+' only loads once. Ignoring:',g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({key: 'AIzaSyCuLhQcDdZTTb4JzpUFms1OCch2dk5lHF0', v: 'weekly'});";
|
"(g=>{var h,a,k,p='The Google Maps JavaScript API',c='google',l='importLibrary',q='__ib__',m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement('script'));e.set('libraries',[...r]+'');for(k in g)e.set(k.replace(/[A-Z]/g,t=>'_'+t[0].toLowerCase()),g[k]);e.set('callback',c+'.maps.'+q);a.src=`https://maps.googleapis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+' could not load.'));a.nonce=m.querySelector('script[nonce]')?.nonce||'';m.head.append(a)}));d[l]?console.warn(p+' only loads once. Ignoring:',g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({key: 'AIzaSyCuLhQcDdZTTb4JzpUFms1OCch2dk5lHF0', v: 'weekly'});";
|
||||||
|
|
||||||
|
function safeExec(cmd, fallback = 'unknown') {
|
||||||
|
try {
|
||||||
|
return execSync(cmd).toString().trim();
|
||||||
|
} catch {
|
||||||
|
return fallback;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const gitInfo = {
|
||||||
|
commit: safeExec('git rev-parse --short HEAD', 'dev'),
|
||||||
|
branch: safeExec('git rev-parse --abbrev-ref HEAD', 'unknown')
|
||||||
|
};
|
||||||
|
|
||||||
|
const buildTimes = {
|
||||||
|
buildTime: new Date().toISOString(),
|
||||||
|
buildTimeLocal: new Date().toLocaleString(),
|
||||||
|
buildTimeStamp: Math.floor(Date.now() / 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
const buildInfo = {
|
||||||
|
version: pkg.version,
|
||||||
|
buildTime: buildTimes.buildTime,
|
||||||
|
buildTimeLocal: buildTimes.buildTimeLocal,
|
||||||
|
buildTimeStamp: buildTimes.buildTimeStamp,
|
||||||
|
...gitInfo,
|
||||||
|
versionString: `${pkg.version}-${gitInfo.commit}-${buildTimes.buildTimeStamp}-${gitInfo.branch}`
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
css: {
|
css: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue