Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

show monocular version in ui #337

Merged
merged 3 commits into from
Aug 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ before_install:
install:
- make -C src/api bootstrap
- make -C src/ui install
- make -C src/ui VERSION=$TRAVIS_TAG set-version
script:
- make -C src/api test test-cover docker-build
- make -C src/ui docker-build # Tests disabled for now
Expand Down
7 changes: 7 additions & 0 deletions src/ui/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
IMAGE_REPO ?= bitnami/monocular-ui
IMAGE_TAG ?= latest

ifeq "$(VERSION)" ""
override VERSION = dev
endif

install:
npm install

Expand All @@ -18,3 +22,6 @@ compile-aot:

docker-build: compile-aot
docker build --pull --rm -t ${IMAGE_REPO}:${IMAGE_TAG} rootfs/

set-version:
sed -i src/version.ts -e 's/dev/${VERSION}/'
1 change: 1 addition & 0 deletions src/ui/src/app/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<div class="footer__repo">
<div class="footer__opensource">Monocular is an
<a class="reverse" href="https://github.com/kubernetes-helm/monocular">Open Source project</a>
| {{ monocularVersion }}
</div>
<span class="footer__maintainers">
With <img src="/assets/images/hearth.svg" />
Expand Down
5 changes: 4 additions & 1 deletion src/ui/src/app/footer/footer.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Component } from '@angular/core';
import { MONOCULAR_VERSION } from '../../version';

@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.scss']
})
export class FooterComponent { }
export class FooterComponent {
monocularVersion: string = MONOCULAR_VERSION;
}
2 changes: 2 additions & 0 deletions src/ui/src/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// This version is automatically set during the release process, see `make set-version`
export const MONOCULAR_VERSION = 'dev';