mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-13 16:06:59 +02:00
Merge pull request #127 from marineam/fix-tag
fix(tag_release): Fix cleanup of old branch manifests.
This commit is contained in:
commit
571ebef01f
14
tag_release
14
tag_release
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user