jothepro / doxygen-awesome-css

Custom CSS theme for doxygen html-documentation with lots of customization parameters.
https://jothepro.github.io/doxygen-awesome-css/
MIT License
981 stars 112 forks source link

Is there a way to check which version of theme that you have? #49

Open jdillard opened 2 years ago

jdillard commented 2 years ago

I looked at doxygen-awesome.css for a version number and didn't see one. Is there currently a way to check with version of the theme files you have if you didn't use the submodule method? If not, would it worthwhile adding version information to the static files (some or all)?

jothepro commented 2 years ago

I currently cannot think of an easy way on how the version information could be included in the files. 🤔 If I was hardcoding a version in there, this would be misleading if someone downloaded the current HEAD (e.g. the file would say "1.6.0" but it includes changes from the HEAD that have not yet been released). Maybe I could achieve sth like this by introducing a more complex branching model where the pipeline is automatically adding version information when merging into master, but I don't think it's worth introducing all the complexity.

If you copy the files instead of using a submodule, maybe the easiest solution for you is to add the version number to the file manually when you copy the file?

jdillard commented 2 years ago

Maybe I could achieve sth like this by introducing a more complex branching model where the pipeline is automatically adding version information when merging into master, but I don't think it's worth introducing all the complexity.

Very true. Instead of basing it off the branching model, you can check if the current commit is tagged and add logic based on that, like maybe prepend the name of the tag to specific published files (although prepending text isn't exactly a clean operation in bash). Something like:

tag=$(git tag --points-at 2>/dev/null || true)

if [ -z ${tag} ]; then
    echo "This commit not tagged."
    exit 0
fi

# tag exists append tag to files, etc
[...]

I understand that still adds complexity though, so just throwing ideas out.

If you copy the files instead of using a submodule, maybe the easiest solution for you is to add the version number to the file manually when you copy the file?

Totally happy to do this!