seas-computing / course-planner

SEAS Course Planning Application. JSDoc Docs at: https://seas-computing.github.io/course-planner/
0 stars 1 forks source link

Add version tag to front-end code #618

Closed jonseitz closed 1 year ago

jonseitz commented 1 year ago

It would be helpful for our front-end code to include the version of the project at compilation time, so that we can make sure that new deployments have been successful. This value is available in our Github Actions build environment, so we just need to inject it during our webpack compilation stage. I thinking we could either:

  1. Add a static <meta> tag to our base index.html file at compilation time.
  2. Write the version into a js variable, then dynamically insert the meta tag when the page loads.

I'm leaning toward option 2, as that would also give us flexibility if we want to display it in other places (e.g., the page footer, logged to the console, etc.). It's also more indicative of a successful update, since the js code is much more likely to change than the index.html file