Replaced git-rev-sync with another package that is still updated
This commit is contained in:
parent
124efa40d9
commit
818a363e8a
|
@ -1196,9 +1196,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "14.0.24",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.24.tgz",
|
||||
"integrity": "sha512-btt/oNOiDWcSuI721MdL8VQGnjsKjlTMdrKyTcLCKeQp/n4AAMFJ961wMbp+09y8WuGPClDEv07RIItdXKIXAA==",
|
||||
"version": "14.0.25",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.25.tgz",
|
||||
"integrity": "sha512-okMqUHqrMlGOxfDZliX1yFX5MV6qcd5PpRz96XYtjkM0Ws/hwg23FMUqt6pETrVRZS+EKUB5HY19mmo54EuQbA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/normalize-package-data": {
|
||||
|
@ -1655,9 +1655,9 @@
|
|||
}
|
||||
},
|
||||
"@vue/preload-webpack-plugin": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.1.tgz",
|
||||
"integrity": "sha512-8VCoJeeH8tCkzhkpfOkt+abALQkS11OIHhte5MBzYaKMTqK0A3ZAKEUVAffsOklhEv7t0yrQt696Opnu9oAx+w==",
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.2.tgz",
|
||||
"integrity": "sha512-LIZMuJk38pk9U9Ur4YzHjlIyMuxPlACdBIHH9/nGYVTsaGKOSnSuELiE8vS9wa+dJpIYspYUOqk+L1Q4pgHQHQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@vue/web-component-wrapper": {
|
||||
|
@ -4345,6 +4345,15 @@
|
|||
"integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==",
|
||||
"dev": true
|
||||
},
|
||||
"dotgitconfig": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/dotgitconfig/-/dotgitconfig-1.1.1.tgz",
|
||||
"integrity": "sha512-gkaAQMmhlE7N6NYtvckQ32f/xTX6Hv7RTtF9qKCYJEQgL/d6zJZk/D0eLFuuGPRCbpRj2PR/HcBLxtIh3MSB6Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ini": "^1.3.5"
|
||||
}
|
||||
},
|
||||
"duplexer": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
|
||||
|
@ -4392,9 +4401,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"electron-to-chromium": {
|
||||
"version": "1.3.504",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.504.tgz",
|
||||
"integrity": "sha512-yOXnuPaaLAIZUVuXHYDCo3EeaiEfbFgYWCPH1tBMp+jznCq/zQYKnf6HmkKBmLJ0VES81avl18JZO1lx/XAHOw==",
|
||||
"version": "1.3.505",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.505.tgz",
|
||||
"integrity": "sha512-Aunrp3HWtmdiJLIl+IPSFtEvJ/4Q9a3eKaxmzCthaZF1gbTbpHUTCU2zOVnFPH7r/AD7zQXyuFidYXzSHXBdsw==",
|
||||
"dev": true
|
||||
},
|
||||
"elliptic": {
|
||||
|
@ -5801,25 +5810,6 @@
|
|||
"assert-plus": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"git-rev-sync": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/git-rev-sync/-/git-rev-sync-2.0.0.tgz",
|
||||
"integrity": "sha512-vnHFv2eocTmt/wHqZm3ksxtVshK4vptT0cEoumk6hAYRFx3do6Qo7xHBTBCv29+r3ZZCQOQ1i328MUCsYF7AUw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"graceful-fs": "4.1.15",
|
||||
"shelljs": "0.7.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"graceful-fs": {
|
||||
"version": "4.1.15",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
|
||||
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.6",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
||||
|
@ -7089,6 +7079,15 @@
|
|||
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
|
||||
"dev": true
|
||||
},
|
||||
"last-commit-log": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/last-commit-log/-/last-commit-log-3.0.4.tgz",
|
||||
"integrity": "sha512-NwvGT6O3eiOIALwxa/i1YcVgQuLO7w/KheP3wORmB2JM9IaG47PbkSAn2BZMa8Z8hkPYblY+awD4lFjHFFsQ9g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"dotgitconfig": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"launch-editor": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.2.1.tgz",
|
||||
|
@ -7939,9 +7938,9 @@
|
|||
}
|
||||
},
|
||||
"node-releases": {
|
||||
"version": "1.1.59",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.59.tgz",
|
||||
"integrity": "sha512-H3JrdUczbdiwxN5FuJPyCHnGHIFqQ0wWxo+9j1kAXAzqNMAHlo+4I/sYYxpyK0irQ73HgdiyzD32oqQDcU2Osw==",
|
||||
"version": "1.1.60",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.60.tgz",
|
||||
"integrity": "sha512-gsO4vjEdQaTusZAEebUWp2a5d7dF5DYoIpDG7WySnk7BuZDW+GPpHXoXXuYawRBr/9t5q54tirPz79kFIWg4dA==",
|
||||
"dev": true
|
||||
},
|
||||
"normalize-package-data": {
|
||||
|
@ -10190,9 +10189,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"shelljs": {
|
||||
"version": "0.7.7",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.7.tgz",
|
||||
"integrity": "sha1-svXHfvlxSPS09uImguELuoZnz/E=",
|
||||
"version": "0.8.4",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz",
|
||||
"integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "^7.0.0",
|
||||
|
@ -11623,17 +11622,6 @@
|
|||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"shelljs": {
|
||||
"version": "0.8.4",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz",
|
||||
"integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -11747,9 +11735,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"vuetify": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.3.5.tgz",
|
||||
"integrity": "sha512-S1DN+Ct3z/Os77CUORmiN2Q802KmjcJnW5ZtKVTevB+ojGEM9BdAiUuUp7nOWeuv/Zc/LnhCP9M3DWHVscPsPA=="
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.3.6.tgz",
|
||||
"integrity": "sha512-mnn5ijJOQf6o443A2ymKrwJAFjaloU0x1QJJArswHv+y2FsSp9obZ6KXDKuzxO6hdGt8VDt/p4S2Hs8A41kbOg=="
|
||||
},
|
||||
"vuetify-loader": {
|
||||
"version": "1.6.0",
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
"eslint-plugin-vue": "^6.2.2",
|
||||
"fast-xml-parser": "^3.17.4",
|
||||
"fscreen": "^1.0.2",
|
||||
"git-rev-sync": "^2.0.0",
|
||||
"humanize-duration": "^3.23.1",
|
||||
"last-commit-log": "^3.0.4",
|
||||
"lodash-es": "^4.17.15",
|
||||
"nconf": "^0.10.0",
|
||||
"sass": "^1.26.10",
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
|
||||
<script>
|
||||
import { mapActions, mapGetters, mapState } from 'vuex';
|
||||
import { formatDistanceToNow, parseISO } from 'date-fns';
|
||||
import { formatDistanceToNow } from 'date-fns';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -219,7 +219,7 @@ export default {
|
|||
},
|
||||
|
||||
date() {
|
||||
return parseISO(process.env.VUE_APP_GIT_DATE);
|
||||
return new Date(parseInt(process.env.VUE_APP_GIT_DATE, 10));
|
||||
},
|
||||
|
||||
updatedAt() {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
const path = require('path');
|
||||
const git = require('git-rev-sync');
|
||||
const LCL = require('last-commit-log');
|
||||
|
||||
const lcl = new LCL();
|
||||
|
||||
const saveConfig = require('./config');
|
||||
|
||||
|
@ -9,13 +11,14 @@ console.log(config);
|
|||
process.env.VUE_APP_VERSION = require('./package.json').version;
|
||||
|
||||
try {
|
||||
process.env.VUE_APP_GIT_HASH = process.env.VUE_APP_GIT_HASH || git.short();
|
||||
process.env.VUE_APP_GIT_DATE = process.env.VUE_APP_GIT_DATE || git.date().toISOString();
|
||||
process.env.VUE_APP_GIT_BRANCH = process.env.VUE_APP_GIT_BRANCH || git.branch();
|
||||
const lastCommit = lcl.getLastCommitSync();
|
||||
process.env.VUE_APP_GIT_HASH = process.env.VUE_APP_GIT_HASH || lastCommit.shortHash;
|
||||
process.env.VUE_APP_GIT_DATE = process.env.VUE_APP_GIT_DATE || lastCommit.committer.date;
|
||||
process.env.VUE_APP_GIT_BRANCH = process.env.VUE_APP_GIT_BRANCH || lastCommit.gitBranch;
|
||||
} catch (e) {
|
||||
// Sometimes on CI stuff they build with .git being present
|
||||
// TODO: find better way to do this
|
||||
process.env.VUE_APP_GIT_DATE = process.env.VUE_APP_GIT_DATE || new Date().toISOString();
|
||||
process.env.VUE_APP_GIT_DATE = process.env.VUE_APP_GIT_DATE || Date.now();
|
||||
|
||||
if (process.env.SOURCE_COMMIT) {
|
||||
process.env.VUE_APP_GIT_HASH = process.env.VUE_APP_GIT_HASH
|
||||
|
|
Loading…
Reference in New Issue