Skip to content

Commit

Permalink
SWIK-360: now displays branch and last commit in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
bwulff committed Feb 1, 2017
1 parent 58388f6 commit eee3ee8
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
build
logs
.git
coverage
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ WORKDIR /nodeApp
# ---------------- #

ADD . /nodeApp
RUN ./make_version.sh

RUN npm install
RUN npm run install

Expand Down
30 changes: 30 additions & 0 deletions components/Footer/Footer.jse
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import { NavLink } from 'fluxible-router';

class Footer extends React.Component {
render() {
return (
<div className="ui horizontal segments footer" ref="footer">
<div className="ui right aligned segment">
<p>
Copyright &copy; 2016 &middot; All Rights Reserved
</p>
</div>
<div className="ui left aligned segment">
<NavLink className="item" routeName="about">About</NavLink>
&nbsp;&middot;&nbsp;
<NavLink className="item" routeName="imprint">Imprint</NavLink>
&nbsp;&middot;&nbsp;
<NavLink className="item" routeName="dataprotection">Data Protection Conditions</NavLink>
</div>
<div className="ui left aligned segment">
<p>
Build GIT_COMMIT on master
</p>
</div>
</div>
);
}
}

export default Footer;
7 changes: 7 additions & 0 deletions make_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

GIT_BRANCH=$(git symbolic-ref --short HEAD)
GIT_COMMIT=$(git rev-parse --short HEAD)

sed -ie "s/GIT_BRANCH/$GIT_BRANCH/g" /nodeApp/components/Footer/Footer.js
sed -ie "s/GIT_COMMIT/$GIT_COMMIT/g" /nodeApp/components/Footer/Footer.js

0 comments on commit eee3ee8

Please sign in to comment.