wilfred-dev / wilfred

🐿️ A CLI for managing game servers using Docker.
https://wilfredproject.org
MIT License
35 stars 2 forks source link

Show commit hash on "wilfred --version" #30

Closed vilhelmprytz closed 4 years ago

vilhelmprytz commented 4 years ago

Is your feature request related to a problem? Please describe. When using the edge channel on the snap package, it can be hard to track which version you are on.

Describe the solution you'd like Display the commit hash upon running wilfred --version.

Describe alternatives you've considered None.

Additional context Should be possible to do within Travis when building for pip and within the snapcraft.yml when building for the snap package.

vilhelmprytz commented 4 years ago

Perhaps this could be used within snapcraft.yml. https://snapcraft.io/blog/run-scripts-during-snapcraft-builds-with-scriptlets

vilhelmprytz commented 4 years ago

Perhaps using this as well.

git log -1 --format="%H"
vilhelmprytz commented 4 years ago

I also removed python3-distutils and build-essential from the stage-packages within the snap/snapcraft.yml which lead to the size of the package decreasing from 64 MB to 11 MB (a whopping 53 MB decrease!).

Before and after