summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2013-12-16 13:02:58 +0000
committerGreg Roach <fisharebest@gmail.com>2013-12-16 21:34:24 +0000
commita00f5d3acb8bfa6f25ce43f9084c0232eaedc374 (patch)
tree1a9ed975ae1139624354f3298e234f5a94814ba5
parent49a125e1a54ecf33b0a5207ccdf92b7317d324df (diff)
downloadwebtrees-a00f5d3acb8bfa6f25ce43f9084c0232eaedc374.tar.gz
webtrees-a00f5d3acb8bfa6f25ce43f9084c0232eaedc374.tar.bz2
webtrees-a00f5d3acb8bfa6f25ce43f9084c0232eaedc374.zip
Update build script to better identify tag/branch
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ee033c2bff..b8131a92f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
BUILD_DIR=build
BUILD_NUMBER=$(shell git log --oneline | wc -l)
BUILD_VERSION=$(if $(WT_RELEASE),$(BUILD_NUMBER),$(WT_VERSION)$(WT_RELEASE))
+GIT_BRANCH=$(git symbolic-ref -q HEAD || git describe --tags --exact-match)
LANGUAGE_DIR=language
LANGUAGE_SRC=$(shell git grep -I --name-only --fixed-strings -e WT_I18N:: -- "*.php" "*.xml")
MO_FILES=$(patsubst %.po,%.mo,$(PO_FILES))
@@ -44,8 +45,8 @@ check:
# Create a release from this GIT branch
################################################################################
build/webtrees: clean update
- # Extract from the repository
- git archive --prefix=$@/ master | tar -x
+ # Extract from the repository, to filter files using .gitattributes
+ git archive --prefix=$@/ $(GIT_BRANCH) | tar -x
# Embed the build number in the code (for DEV builds only)
sed -i "s/define('WT_RELEASE', '$(WT_VERSION)-dev')/define('WT_RELEASE', '$(WT_VERSION)-dev+$(BUILD_NUMBER)')/" $@/includes/session.php
# Add language files