Commit ded9d645 authored by Reza Sahebgharan's avatar Reza Sahebgharan

appversion major minor patch

parent 0fd20d52
......@@ -3,6 +3,12 @@
<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>
</template>
......@@ -12,7 +18,10 @@ export default {
return {
Version: VERSION,
CommitHash: COMMITHASH,
Branch: BRANCH
Branch: BRANCH,
Major: MAJOR,
Minor: MINOR,
Patch: PATCH
};
}
};
......
......@@ -9,6 +9,7 @@ const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const GitRevisionPlugin = require('git-revision-webpack-plugin');
const gitRevisionPlugin = new GitRevisionPlugin();
const clientConfig = {
entry: './client/main.js',
// output: {
......@@ -160,6 +161,9 @@ const clientConfig = {
'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]
})
]
}
......
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