Merge pull request #127 from marineam/fix-tag

fix(tag_release): Fix cleanup of old branch manifests.
This commit is contained in:
Michael Marineau 2013-10-24 18:26:33 -07:00
commit 571ebef01f

View File

@ -26,14 +26,12 @@ TAG_NAME="v${FLAGS_build}.${FLAGS_branch}.${FLAGS_patch}"
cd "${GCLIENT_ROOT}/.repo/manifests" cd "${GCLIENT_ROOT}/.repo/manifests"
# Clean up existing branch manifest(s) # Clean up existing branch manifest(s) excluding:
if [[ $(ls branch-*.xml 2>/dev/null) ]]; then # - the current branch if the file already exists.
for old_branch in branch-*.xml; do # - one previous branch, useful for comparing releases.
if [[ "${old_branch}" != "${BRANCH_NAME}.xml" ]]; then OLD_BRANCHES=$(find -maxdepth 1 -name 'build-*.xml' \
git rm -f "${old_branch}" -not -name "${BRANCH_NAME}.xml" | sort -rn | tail -n -1)
fi git rm -f ${OLD_BRANCHES}
done
fi
repo manifest -o "${BRANCH_NAME}.xml" -r repo manifest -o "${BRANCH_NAME}.xml" -r
tee version.txt <<EOF tee version.txt <<EOF