mirror of
https://github.com/openwrt/luci.git
synced 2026-07-12 20:34:31 +04:00
luci.mk: add reproducibility by setting specific version hash length
The `git branch` feature may return different hash length, resulting in reproducibility issues. │ │ ├── ./usr/share/ucode/luci/version.uc │ │ │ @@ -1 +1 @@ │ │ │ -export const revision = '26.133.20346~e9ebca7', branch = 'LuCI (HEAD detached ate9ebca7) branch'; │ │ │ +export const revision = '26.133.20346~e9ebca7', branch = 'LuCI (HEAD detached ate9ebca75) branch'; Since `git branch` does not support `--abbrev=7` like `git log` does, use `-c core.abbrev=7`. Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
committed by
Christian Marangi
parent
8049a746dc
commit
2f30690fe0
@@ -126,7 +126,7 @@ PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \
|
||||
variant="LuCI"; \
|
||||
if git log -1 >/dev/null 2>/dev/null; then \
|
||||
branch=$$(git branch --format='%(refname:strip=3)' --remote --no-abbrev --contains 2>/dev/null | tail -n1); \
|
||||
branch=$${branch:-$$(git branch --format='%(refname:strip=2)' --no-abbrev --contains 2>/dev/null | tail -n1)}; \
|
||||
branch=$${branch:-$$(git -c core.abbrev=7 branch --format='%(refname:strip=2)' --contains 2>/dev/null | tail -n1)}; \
|
||||
if [ "$$branch" != "master" ]; then \
|
||||
variant="LuCI $${branch:-unknown} branch"; \
|
||||
else \
|
||||
|
||||
Reference in New Issue
Block a user