From 4e7d27a0d4dc5910256b3f74fbfd5bee7182cc88 Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Wed, 7 Jun 2017 15:21:25 +0200 Subject: [PATCH] get_snapshot: Use UPSTREAM_GIT_BRANCH instead of HEAD --- get_snapshot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/get_snapshot b/get_snapshot index 638f726..82110ce 100755 --- a/get_snapshot +++ b/get_snapshot @@ -54,11 +54,11 @@ else exit 1 fi -git_version=$(git describe --tags HEAD) +git_version=$(git describe --tags "${UPSTREAM_GIT_BRANCH}") package_version=$(echo "$git_version" | sed -e 's/^v//' -e 's/-/./g') tarball="${workdir}/${PROJECT}-${package_version}.tar" -git archive --format=tar --prefix="${PROJECT}-${package_version}/" -o "${tarball}" HEAD +git archive --format=tar --prefix="${PROJECT}-${package_version}/" -o "${tarball}" "${UPSTREAM_GIT_BRANCH}" # creating version file for tarball mkdir "${PROJECT}-${package_version}" @@ -71,4 +71,4 @@ gzip -vf9 "${tarball}" sha256sum "${tarball}.gz" # store package version for build scripts -echo -e "${package_version}\t$(git rev-parse HEAD)\t$(basename "${tarball}.gz")\t${UPSTREAM_GIT_BRANCH}" > "${workdir}/${PROJECT}.version" +echo -e "${package_version}\t$(git rev-parse "${UPSTREAM_GIT_BRANCH}")\t$(basename "${tarball}.gz")\t${UPSTREAM_GIT_BRANCH}" > "${workdir}/${PROJECT}.version"