Skip to content

Commit

Permalink
adds version to copyright on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
petethepig committed Jan 11, 2021
1 parent cd36317 commit b16e11e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions scripts/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ module.exports = {
new MiniCssExtractPlugin({
filename: '[name].[hash].css',
}),
// new BundleAnalyzerPlugin({
// analyzerPort: 8889
// }),
new webpack.DefinePlugin({
PYROSCOPE_VERSION: JSON.stringify(require("../../package.json").version)
}),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new CopyPlugin({
patterns: [
Expand Down
6 changes: 5 additions & 1 deletion webapp/javascript/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ function copyrightYears(start, end) {
return start == end ? start : `${start}${end}`;
}

function version(){
return 'v'+PYROSCOPE_VERSION;
}

class Footer extends React.Component {
constructor(props) {
super(props);
Expand All @@ -19,7 +23,7 @@ class Footer extends React.Component {
// let flags = BUILD_FLAGS.split("\n").map(x => x.replace("-X github.com/pyroscope-io/pyroscope/pkg/build.", ""));
// console.log(flags);
return <div className="footer">
<span>© Pyroscope {copyrightYears(START_YEAR, new Date().getFullYear())}</span>
<span title={version()}>© Pyroscope {copyrightYears(START_YEAR, new Date().getFullYear())}</span>
</div>
}
}
Expand Down

0 comments on commit b16e11e

Please sign in to comment.