Amber
Amber copied to clipboard
Include git sha in the complied header
Is your feature request related to a problem? Please describe. Sometime I want to know what exact version is used when reading a sh script compiled using the master branch.
Describe the solution you'd like
#!/usr/bin/env bash
# Written in [Amber](https://amber-lang.com/)
# version: 0.3.5-alpha (19c3e35c6836a75e931761386616557e63e44c30)
# date: 2024-12-12 16:37:29
And shows whether the worktree is dirty.
# version: 0.3.5-alpha (19c3e35c6836a75e931761386616557e63e44c30, dirty worktree)
What I've found on StackOverflow recommands to executing git command before the building. https://stackoverflow.com/a/44407625/10916512
i think it will make sense only on development builds. theres no need for this in releases