Browse Source

- add 'git rev-list' output to .version file

master
vanhofen 6 years ago
parent
commit
bc2e285a92
  1. 5
      make/rootfs.mk

5
make/rootfs.mk

@ -8,11 +8,12 @@ rootfs: .version update.urls $(ROOTFS) cleanup strip softlinks
.version: $(TARGET_DIR)/.version
$(TARGET_DIR)/.version:
echo "version="$(IMAGE_TYPE)$(IMAGE_VERSION)$(IMAGE_DATE) > $@
# determinate last NI-release-tag an use this to git describe
# determinate last NI-tag an use this to git describe
GITTAG=`cd $(SOURCE_DIR)/$(NI_NEUTRINO); git tag -l "NI-*" | tail -n1`; \
GITDESCRIBE=`cd $(SOURCE_DIR)/$(NI_NEUTRINO); git describe --always --dirty --tags --match $$GITTAG`; \
GITDESCRIBE=$${GITDESCRIBE%-dirty}; \
echo "describe="$$GITDESCRIBE >> $@
GITREVLIST=`git rev-list $$GITTAG.. --count`; \
echo "describe="$$GITDESCRIBE.$$GITREVLIST >> $@
# determinate current branch in origin repo
BRANCH=`cd $(SOURCE_DIR)/$(NI_NEUTRINO); git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`; \
echo "branch="$$BRANCH >> $@

Loading…
Cancel
Save