mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-31 20:21:54 -07:00
nix: build improvements (#5952)
* scripts: allow using existing variable values in generateVersion.sh * nix: populate versioning variables * nix: remove unused meson input * nix: remove unnecessary hyprland-protocols dependency * Nix: remove nixConfig from flake It's more annoying than helpful. * CI/Nix: fix PR build failure --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#!/bin/sh
|
||||
cp -fr ./src/version.h.in ./src/version.h
|
||||
|
||||
HASH=$(git rev-parse HEAD)
|
||||
BRANCH=$(git branch --show-current)
|
||||
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)
|
||||
COMMITS=$(git rev-list --count HEAD)
|
||||
HASH=${HASH-$(git rev-parse HEAD)}
|
||||
BRANCH=${BRANCH-$(git branch --show-current)}
|
||||
MESSAGE=${MESSAGE-$(git show | head -n 5 | tail -n 1 | sed -e 's/#//g' -e 's/\"//g')}
|
||||
DATE=${DATE-$(git show --no-patch --format=%cd --date=local)}
|
||||
DIRTY=${DIRTY-$(git diff-index --quiet HEAD -- || echo dirty)}
|
||||
TAG=${TAG-$(git describe --tags)}
|
||||
COMMITS=${COMMITS-$(git rev-list --count HEAD)}
|
||||
|
||||
sed -i -e "s#@HASH@#${HASH}#" ./src/version.h
|
||||
sed -i -e "s#@BRANCH@#${BRANCH}#" ./src/version.h
|
||||
|
Reference in New Issue
Block a user