diff options
author | MightyPlaza <[email protected]> | 2023-12-17 14:29:58 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-12-17 14:29:58 +0000 |
commit | 2a777cb71bc727836ca9c73ebb193773a99f8f1e (patch) | |
tree | 41cf460712f68a90966060734e5fdd74b7359b3f /scripts | |
parent | 9ca0c7d814d6039450ff0341556faa1ce9b37e82 (diff) | |
download | Hyprland-2a777cb71bc727836ca9c73ebb193773a99f8f1e.tar.gz Hyprland-2a777cb71bc727836ca9c73ebb193773a99f8f1e.zip |
hyprctl: add commit date to "hyprctl version" (#4171)
* add commit date to "hyprctl version"
modified: scripts/generateVersion.sh
modified: src/debug/HyprCtl.cpp
modified: src/version.h.in
* Nix: add date to hyprctl
---------
Co-authored-by: Mihai Fufezan <[email protected]>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/generateVersion.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/generateVersion.sh b/scripts/generateVersion.sh index c54e2ebd..443c5c54 100755 --- a/scripts/generateVersion.sh +++ b/scripts/generateVersion.sh @@ -4,11 +4,13 @@ cp -fr ./src/version.h.in ./src/version.h HASH=$(git rev-parse HEAD) BRANCH=$(git rev-parse --abbrev-ref HEAD) MESSAGE=$(git show ${GIT_COMMIT_HASH} | head -n 5 | tail -n 1 | sed -e 's/#//g' -e 's/\"//g') +DATE=$(git show ${GIT_COMMIT_HASH} --no-patch --format=%cd --date=local) DIRTY=$(git diff-index --quiet HEAD -- || echo dirty) TAG=$(git describe --tags) sed -i -e "s#@HASH@#${HASH}#" ./src/version.h sed -i -e "s#@BRANCH@#${BRANCH}#" ./src/version.h sed -i -e "s#@MESSAGE@#${MESSAGE}#" ./src/version.h +sed -i -e "s#@DATE@#${DATE}#" ./src/version.h sed -i -e "s#@DIRTY@#${DIRTY}#" ./src/version.h -sed -i -e "s#@TAG@#${TAG}#" ./src/version.h
\ No newline at end of file +sed -i -e "s#@TAG@#${TAG}#" ./src/version.h |