Skip to content

Commit

Permalink
DSP-666 Fix issue with version number (#304)
Browse files Browse the repository at this point in the history
* fix(help): Fix issue with version number

* chore(help): Add sipi version

* fix(help): Add missing semicolon
  • Loading branch information
kilchenmann committed Sep 24, 2020
1 parent 680808e commit af292fb
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/app/main/help/help.component.ts
Expand Up @@ -16,7 +16,7 @@ const { version: appVersion, name: appName } = require('../../../../package.json
})
export class HelpComponent implements OnInit {

loading: boolean = true;
loading = true;

appVersion: string = appVersion;

Expand All @@ -26,6 +26,8 @@ export class HelpComponent implements OnInit {

apiStatus: boolean;

sipiVersion = 'v3.0.0-rc.5';

docs: GridItem[] = [
{
icon: 'assignment',
Expand Down Expand Up @@ -60,13 +62,13 @@ export class HelpComponent implements OnInit {
{
title: 'DSP-API ',
text: 'Framework to store, share, and work with primary resources in the humanities.',
url: 'https://github.com/dasch-swiss/knora-api/releases/tag/v',
url: 'https://github.com/dasch-swiss/knora-api/releases/tag/',
urlText: 'Release notes'
},
{
title: 'Sipi v2.0.0',
title: 'Sipi ',
text: 'High-performance, IIIF compatible media storage server.',
url: 'https://github.com/dasch-swiss/Sipi/releases/tag/v2.0.0',
url: 'https://github.com/dasch-swiss/Sipi/releases/tag/',
urlText: 'Release notes'
}
];
Expand Down Expand Up @@ -115,6 +117,10 @@ export class HelpComponent implements OnInit {
this.tools[0].title = this.appName + ' v' + this.appVersion;
this.tools[0].url += this.appVersion;

// set dsp-sipi version
this.tools[2].title += this.sipiVersion;
this.tools[2].url += this.sipiVersion;

const apiUrl: string = this._dspApiConfig.apiUrl;

this._http.get(apiUrl + '/admin/projects', { observe: 'response' })
Expand Down Expand Up @@ -143,8 +149,8 @@ export class HelpComponent implements OnInit {
const versions: string[] = v.split(' ');
const dspApi: string = versions[0].split('/')[1];

// keep version number as x.y.z format (no extra suffix e.g. -SNAPSHOT)
this.apiVersion = dspApi.split('-')[0];
// keep whole version number incl. -rc.xy
this.apiVersion = dspApi;

this.tools[1].title += this.apiVersion;
this.tools[1].url += this.apiVersion;
Expand Down

0 comments on commit af292fb

Please sign in to comment.