Commit 05c3dafc authored by Anton Midyukov's avatar Anton Midyukov

lib/profile.mk, build-distro: save current commit, when generating a profile

Images building from the generated profile will have mkimage-profiles commit information.
parent 7318e05d
...@@ -40,8 +40,4 @@ dot-disk: ...@@ -40,8 +40,4 @@ dot-disk:
fi fi
@echo "$(ARCH)" >files/.disk/arch @echo "$(ARCH)" >files/.disk/arch
@echo "$(DATE)" >files/.disk/date @echo "$(DATE)" >files/.disk/date
@if type -t git >&/dev/null; then \ @if [ -s commit ]; then cp commit files/.disk/; fi
( cd $(TOPDIR) && test -d .git && \
git show-ref --head -ds -- HEAD ||:) \
>files/.disk/commit 2>/dev/null; \
fi
...@@ -71,6 +71,9 @@ profile/init: distclean ...@@ -71,6 +71,9 @@ profile/init: distclean
[ "$(CHECK)" = 0 ] || exit 1; \ [ "$(CHECK)" = 0 ] || exit 1; \
fi; \ fi; \
fi; \ fi; \
if type -t git >&/dev/null && [ -d .git ]; then \
git show -s --format=%H > "$(BUILDDIR)"/commit; \
fi; \
mp-commit -i "$(BUILDDIR)" "derivative profile initialized"; \ mp-commit -i "$(BUILDDIR)" "derivative profile initialized"; \
if [ -w . ]; then \ if [ -w . ]; then \
rm -f "$(SYMLINK)" && \ rm -f "$(SYMLINK)" && \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment