Get version from package.json
This commit is contained in:
parent
bbffcd5aed
commit
5535df0334
4 changed files with 4 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "gisaf-frontend",
|
||||
"displayName": "Gisaf web front-end",
|
||||
"version": "0.0.0",
|
||||
"version": "0.5.0",
|
||||
"license": "GPL-3.0",
|
||||
"description": "Gisaf Geomatics",
|
||||
"repository": {
|
||||
|
@ -18,8 +18,7 @@
|
|||
"lint": "ng lint",
|
||||
"e2e": "ng e2e",
|
||||
"openapi-ts": "openapi-ts -i http://127.0.0.1:5080/openapi.json -o src/app/openapi --client angular",
|
||||
"source-map-explorer": "source-map-explorer dist/*.js",
|
||||
"version": "echo \"{\\\"version\\\":\\\"$(git describe --tags --dirty --always)\\\"}\" > src/version.json"
|
||||
"source-map-explorer": "source-map-explorer dist/*.js"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ import { MatDialog, MatDialogRef } from '@angular/material/dialog'
|
|||
|
||||
import { AuthenticationService } from './_services/authentication.service'
|
||||
import { LoginDialogComponent } from './login/login.component'
|
||||
import versionJson from '../version.json'
|
||||
import packageJson from '../../package.json'
|
||||
|
||||
export class Version {
|
||||
public backend: string
|
||||
|
@ -61,7 +61,7 @@ export class AppComponent implements OnInit {
|
|||
this.bootstrapService.get().subscribe({
|
||||
next: res => {
|
||||
this.version.backend = res.version
|
||||
this.version.frontend = versionJson["version"]
|
||||
this.version.frontend = packageJson["version"]
|
||||
this.title = res.title || this.title
|
||||
this.titleService.setTitle(res.windowTitle || this.title)
|
||||
this.configService.setConf(res)
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"version": "0.0.0"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue