Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
e87219ea
Commit
e87219ea
authored
1 year ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
simplify app version
parent
81a6a68b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!760
simplify app version
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gradle.properties
+2
-2
2 additions, 2 deletions
gradle.properties
gradle/app-version.gradle
+1
-7
1 addition, 7 deletions
gradle/app-version.gradle
src/main/java/gov/usgs/earthquake/nshmp/www/HazVersion.java
+2
-8
2 additions, 8 deletions
src/main/java/gov/usgs/earthquake/nshmp/www/HazVersion.java
with
5 additions
and
17 deletions
gradle.properties
+
2
−
2
View file @
e87219ea
...
@@ -12,8 +12,8 @@ micronautVersion = 3.2.3
...
@@ -12,8 +12,8 @@ micronautVersion = 3.2.3
micronautRxVersion
=
2.1.1
micronautRxVersion
=
2.1.1
nodePluginVersion
=
3.0.1
nodePluginVersion
=
3.0.1
nodeVersion
=
16.3.0
nodeVersion
=
16.3.0
nshmpLibVersion
=
1.4.
1
nshmpLibVersion
=
1.4.
2
nshmpWsUtilsVersion
=
0.3.1
3
nshmpWsUtilsVersion
=
0.3.1
4
openApiVersion
=
4.0.0
openApiVersion
=
4.0.0
shadowVersion
=
7.1.2
shadowVersion
=
7.1.2
spotbugsVersion
=
4.7.0
spotbugsVersion
=
4.7.0
...
...
This diff is collapsed.
Click to expand it.
gradle/app-version.gradle
+
1
−
7
View file @
e87219ea
...
@@ -9,14 +9,8 @@ tasks.withType(JavaCompile) {
...
@@ -9,14 +9,8 @@ tasks.withType(JavaCompile) {
try
{
try
{
def
details
=
versionDetails
()
def
details
=
versionDetails
()
def
ciProjectUrl
=
System
.
getenv
(
"CI_PROJECT_URL"
)
def
ciProjectUrl
=
System
.
getenv
(
"CI_PROJECT_URL"
)
def
branch
=
System
.
getenv
(
"CI_COMMIT_BRANCH"
)
def
versionInfo
=
[
def
versionInfo
=
[
branchName:
branch
?
branch
:
details
.
branchName
,
gitHash:
details
.
gitHashFull
,
commitDistance:
details
.
commitDistance
,
gitHash:
details
.
gitHash
,
gitHashFull:
details
.
gitHashFull
,
isCleanTag:
details
.
isCleanTag
,
lastTag:
details
.
lastTag
,
projectName:
project
.
name
,
projectName:
project
.
name
,
url:
ciProjectUrl
?
ciProjectUrl
:
"git config --get remote.origin.url"
.
execute
().
text
.
replace
(
"\n"
,
""
),
url:
ciProjectUrl
?
ciProjectUrl
:
"git config --get remote.origin.url"
.
execute
().
text
.
replace
(
"\n"
,
""
),
version:
details
.
version
,
version:
details
.
version
,
...
...
This diff is collapsed.
Click to expand it.
src/main/java/gov/usgs/earthquake/nshmp/www/HazVersion.java
+
2
−
8
View file @
e87219ea
...
@@ -46,7 +46,6 @@ public class HazVersion implements AppVersion {
...
@@ -46,7 +46,6 @@ public class HazVersion implements AppVersion {
try
{
try
{
var
git
=
Git
.
open
(
modelPath
.
toFile
());
var
git
=
Git
.
open
(
modelPath
.
toFile
());
var
repo
=
git
.
getRepository
();
var
repo
=
git
.
getRepository
();
var
hash
=
repo
.
getRefDatabase
().
findRef
(
"HEAD"
).
getObjectId
().
name
();
var
url
=
repo
var
url
=
repo
.
getConfig
()
.
getConfig
()
.
getString
(
"remote"
,
"origin"
,
"url"
)
.
getString
(
"remote"
,
"origin"
,
"url"
)
...
@@ -56,14 +55,9 @@ public class HazVersion implements AppVersion {
...
@@ -56,14 +55,9 @@ public class HazVersion implements AppVersion {
return
VersionInfo
.
builder
()
return
VersionInfo
.
builder
()
.
projectName
(
projectName
)
.
projectName
(
projectName
)
.
url
(
repo
.
getConfig
().
getString
(
"remote"
,
"origin"
,
"
url
"
)
)
.
url
(
url
)
.
version
(
git
.
describe
().
call
())
.
version
(
git
.
describe
().
call
())
.
branchName
(
repo
.
getBranch
())
.
gitHash
(
repo
.
getRefDatabase
().
findRef
(
"HEAD"
).
getObjectId
().
name
())
.
commitDistance
(
0
)
.
gitHash
(
hash
.
substring
(
0
,
10
))
.
gitHashFull
(
hash
)
.
isCleanTag
(
git
.
status
().
call
().
isClean
())
.
lastTag
(
""
)
.
build
();
.
build
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
null
;
return
null
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment