Skip to content

Commit b16e11e

Browse files
committed
adds version to copyright on hover
1 parent cd36317 commit b16e11e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

scripts/webpack/webpack.common.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ module.exports = {
177177
new MiniCssExtractPlugin({
178178
filename: '[name].[hash].css',
179179
}),
180-
// new BundleAnalyzerPlugin({
181-
// analyzerPort: 8889
182-
// }),
180+
new webpack.DefinePlugin({
181+
PYROSCOPE_VERSION: JSON.stringify(require("../../package.json").version)
182+
}),
183183
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
184184
new CopyPlugin({
185185
patterns: [

webapp/javascript/components/Footer.jsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ function copyrightYears(start, end) {
1010
return start == end ? start : `${start}${end}`;
1111
}
1212

13+
function version(){
14+
return 'v'+PYROSCOPE_VERSION;
15+
}
16+
1317
class Footer extends React.Component {
1418
constructor(props) {
1519
super(props);
@@ -19,7 +23,7 @@ class Footer extends React.Component {
1923
// let flags = BUILD_FLAGS.split("\n").map(x => x.replace("-X github.com/pyroscope-io/pyroscope/pkg/build.", ""));
2024
// console.log(flags);
2125
return <div className="footer">
22-
<span>© Pyroscope {copyrightYears(START_YEAR, new Date().getFullYear())}</span>
26+
<span title={version()}>© Pyroscope {copyrightYears(START_YEAR, new Date().getFullYear())}</span>
2327
</div>
2428
}
2529
}

0 commit comments

Comments
 (0)