Commit 817c887e authored by Reza Sahebgharan's avatar Reza Sahebgharan

webpack change for appversion calculating WAD-7069

parent 54b65b7d
......@@ -6,6 +6,9 @@
elevation="24"
class="d-flex justify-center align-center text-center red--text"
>
<v-card-text>
</v-card-text>
<v-menu transition="slide-x-transition">
<template v-slot:activator="{ on }">
<v-btn
......
<template>
<div>
<div>FullVersion: {{FullVersion}}</div>
<div>Version: {{Version}}</div>
<div>CommitHash:{{CommitHash}}</div>
<div>BRANCH:{{Branch}}</div>
<div>MAJOR:{{Major}}</div>
<div>MINOR:{{Minor}}</div>
<div>PATCH:{{Patch}}</div>
<div>CommitHash: {{CommitHash}}</div>
<div>BRANCH: {{Branch}}</div>
<div>MAJOR: {{Major}}</div>
<div>MINOR: {{Minor}}</div>
<div>PATCH: {{Patch}}</div>
</div>
</template>
......@@ -21,7 +19,8 @@ export default {
Branch: BRANCH,
Major: MAJOR,
Minor: MINOR,
Patch: PATCH
Patch: PATCH,
FullVersion: FULLVERSION
};
}
};
......
......@@ -11,8 +11,6 @@ import Worklist from '../collections/worklist.js';
import workListItemSchema from '../collections/worklistItemSchema.js';
Meteor.methods({
'Fetchworklist' (devicemap) {
......
{
"name": "karname-ui",
"requires": true,
"version": "0.0.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.5.5",
......@@ -2897,6 +2898,15 @@
"assert-plus": "^1.0.0"
}
},
"git-describe": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/git-describe/-/git-describe-4.0.4.tgz",
"integrity": "sha512-L1X9OO1e4MusB4PzG9LXeXCQifRvyuoHTpuuZ521Qyxn/B0kWHWEOtsT4LsSfSNacZz0h4ZdYDsDG7f+SrA3hg==",
"requires": {
"lodash": "^4.17.11",
"semver": "^5.6.0"
}
},
"git-revision-webpack-plugin": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/git-revision-webpack-plugin/-/git-revision-webpack-plugin-3.0.4.tgz",
......@@ -8047,6 +8057,5 @@
"decamelize": "^1.2.0"
}
}
},
"version": "0.0.2"
}
}
......@@ -3,11 +3,11 @@
"private": true,
"version": "0.0.2",
"scripts": {
"start": "meteor run",
"start": "meteor run --inspect --settings settings.json",
"test": "meteor test --once --driver-package meteortesting:mocha",
"test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
"visualize": "meteor --production --extra-packages bundle-visualizer",
"build": "webpack"
"build": "npm version --allow-same-version from-git || meteor run --inspect --settings settings.json"
},
"dependencies": {
"@babel/plugin-transform-runtime": "^7.5.5",
......@@ -15,6 +15,7 @@
"bcrypt": "^3.0.6",
"connect-route": "^0.1.5",
"fibers": "^4.0.1",
"git-describe": "^4.0.4",
"meteor-node-stubs": "^1.0.0",
"simpl-schema": "^1.5.5",
"valid-url": "^1.0.9",
......
......@@ -9,6 +9,12 @@ const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const GitRevisionPlugin = require('git-revision-webpack-plugin');
const gitRevisionPlugin = new GitRevisionPlugin();
const { gitDescribe, gitDescribeSync } = require('git-describe');
const gitInfo = gitDescribeSync(__dirname, {
longSemver: true,
dirtySemver: false
});
const clientConfig = {
entry: './client/main.js',
......@@ -158,12 +164,22 @@ const clientConfig = {
}),
new VueLoaderPlugin(),
new webpack.DefinePlugin({
'VERSION': JSON.stringify(gitRevisionPlugin.version()),
// 'VERSION': JSON.stringify(gitRevisionPlugin.version()),
// 'COMMITHASH': JSON.stringify(gitRevisionPlugin.commithash()),
// 'BRANCH': JSON.stringify(gitRevisionPlugin.branch()),
// "MAJOR": (gitRevisionPlugin.version().split("-")[0].split(".")[0].toString().substr(1)),
// "MINOR": (gitRevisionPlugin.version()).split("-")[0].split(".")[1],
// "PATCH": (gitRevisionPlugin.version()).split("-")[0].split(".")[2]
'FULLVERSION': JSON.stringify(gitInfo.semverString),
'COMMITHASH': JSON.stringify(gitRevisionPlugin.commithash()),
'BRANCH': JSON.stringify(gitRevisionPlugin.branch()),
"MAJOR": (gitRevisionPlugin.version().split("-")[0].split(".")[0].toString().substr(1)),
"MINOR": (gitRevisionPlugin.version()).split("-")[0].split(".")[1],
"PATCH": (gitRevisionPlugin.version()).split("-")[0].split(".")[2]
'VERSION': JSON.stringify(gitInfo.semver.version),
"MAJOR": JSON.stringify(gitInfo.semver.major),
"MINOR": JSON.stringify(gitInfo.semver.minor),
"PATCH": JSON.stringify(gitInfo.semver.patch)
})
]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment