AbsaOSS / login-service

AbsaOSS Common Login gateway using JWT Public key signatures
Apache License 2.0
2 stars 0 forks source link

Improve upon the current git.properties generation #40

Closed TheLydonKing closed 1 year ago

TheLydonKing commented 1 year ago

Background

A feature has been added in #39 to the project for users to generate git information to display on the info endpoint. More elegant solutions exist for Maven and Gradle but for SBT there don't seem to be any predefined solutions (Or at least nothing that I could find).

Feature

The solution at the moment isn't too elegant as it requires the app to be restarted after the initial file generation. This issue is to improve upon the current solution.

Proposed Solution

Solution Ideas:

  1. Try and generate the file at compile time rather than runtime? I'm still a beginner with SBT but it seems like you can generate some sources and files at compile time with SBT? (https://www.scala-sbt.org/1.x/docs/Howto-Generating-Files.html) Please correct me if I'm wrong.
  2. Optional extra: Separate the tool into its own executable within the project.
  3. Optional extra: Have the tool run as a test by users.
  4. Please propose a solution if you have any ideas.