Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
karname-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Reza Sahebgharan
karname-ui
Commits
ded9d645
Commit
ded9d645
authored
Oct 07, 2019
by
Reza Sahebgharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appversion major minor patch
parent
0fd20d52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
AppVersion.vue
client/views/AppVersion.vue
+10
-1
webpack.config.js
webpack.config.js
+4
-0
No files found.
client/views/AppVersion.vue
View file @
ded9d645
...
@@ -3,6 +3,12 @@
...
@@ -3,6 +3,12 @@
<div>
Version:
{{
Version
}}
</div>
<div>
Version:
{{
Version
}}
</div>
<div>
CommitHash:
{{
CommitHash
}}
</div>
<div>
CommitHash:
{{
CommitHash
}}
</div>
<div>
BRANCH:
{{
Branch
}}
</div>
<div>
BRANCH:
{{
Branch
}}
</div>
<div>
MAJOR:
{{
Major
}}
</div>
<div>
MINOR:
{{
Minor
}}
</div>
<div>
PATCH:
{{
Patch
}}
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -12,7 +18,10 @@ export default {
...
@@ -12,7 +18,10 @@ export default {
return
{
return
{
Version
:
VERSION
,
Version
:
VERSION
,
CommitHash
:
COMMITHASH
,
CommitHash
:
COMMITHASH
,
Branch
:
BRANCH
Branch
:
BRANCH
,
Major
:
MAJOR
,
Minor
:
MINOR
,
Patch
:
PATCH
};
};
}
}
};
};
...
...
webpack.config.js
View file @
ded9d645
...
@@ -9,6 +9,7 @@ const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
...
@@ -9,6 +9,7 @@ const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const
GitRevisionPlugin
=
require
(
'git-revision-webpack-plugin'
);
const
GitRevisionPlugin
=
require
(
'git-revision-webpack-plugin'
);
const
gitRevisionPlugin
=
new
GitRevisionPlugin
();
const
gitRevisionPlugin
=
new
GitRevisionPlugin
();
const
clientConfig
=
{
const
clientConfig
=
{
entry
:
'./client/main.js'
,
entry
:
'./client/main.js'
,
// output: {
// output: {
...
@@ -160,6 +161,9 @@ const clientConfig = {
...
@@ -160,6 +161,9 @@ const clientConfig = {
'VERSION'
:
JSON
.
stringify
(
gitRevisionPlugin
.
version
()),
'VERSION'
:
JSON
.
stringify
(
gitRevisionPlugin
.
version
()),
'COMMITHASH'
:
JSON
.
stringify
(
gitRevisionPlugin
.
commithash
()),
'COMMITHASH'
:
JSON
.
stringify
(
gitRevisionPlugin
.
commithash
()),
'BRANCH'
:
JSON
.
stringify
(
gitRevisionPlugin
.
branch
()),
'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
]
})
})
]
]
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment