grafana / explore-traces

Opinionated traces app
Apache License 2.0
21 stars 0 forks source link

Incorrect version in Preview Badge #239

Closed ifrost closed 1 month ago

ifrost commented 1 month ago

Details

When building with Drone the Preview badge doesn't get the correct version number:

Image

Everything looks fine when building with GitHub actions

Image

Drone is set up to run webpack command directly, not via npm.

Steps to reproduce

  1. Run npm run build
  2. Open dist/module.js
  3. Search for v0.1.2 (or different depending on what's in package.json)
  4. You should see something like ...const xv=`v0.1.2 - ${"2024-09-23T09:10:00.222Z".split("T")[0]} (78b49a7)...
  5. Run ./node_modules/.bin/webpack -c ./webpack.config.ts --env production (same command but directly with node)
  6. Open dist/module.js
  7. Search for v0.1.2 (or different depending on what's in package.json) -> shows no results
  8. Search for vundefined (or different depending on what's in package.json)
  9. You will see something like const xv=`vundefined - ${"2024-09-23T09:18:57.553Z".split("T")[0]} (e64844b)...

Expected: Regardless how webpack is run the version should be updated correctly.