Skip to content

Commit

Permalink
Clear extraneous CHANGELOG files on a new branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-mcmahon committed Mar 1, 2018
1 parent f75e934 commit 5a9c0cf
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion anago
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ EOF
"$action $CHANGELOG_FILE for $RELEASE_VERSION_PRIME." \
|| return 1

# Sync $CHANGELOG_FILE to release-* branch
# Sync $CHANGELOG_FILE to release-* branch and clear all others
if [[ "$RELEASE_BRANCH" =~ release- ]]; then
logecho -n "Checkout $RELEASE_BRANCH branch to make changes: "
logrun -s git checkout $RELEASE_BRANCH || return 1
Expand Down Expand Up @@ -622,6 +622,23 @@ prepare_tree () {
# "Generating docs for ${RELEASE_VERSION[$label]} on $branch."
#fi

# Clear all CHANGELOG-N.NN.md files on the branch.
# This replaces the above commented out change to the branch.
# Some unique change is required on the branch to allow it to be git
# describe'd as something other than the current tag on master
# If/when the generate-docs.sh issue is sorted out, this will become
# optional, though probably still useful anyway.
if [[ "$PARENT_BRANCH" == "master" && "$branch" != "master" ]]; then
logecho -n "Remove any previous CHANGELOG-*.md files: "
logrun -s git rm -f CHANGELOG-*.md || return 1
logecho -n "Copy master $CHANGELOG_FILE to $branch branch: "
logrun -s git checkout master -- $CHANGELOG_FILE || return 1
logecho -n "Committing deleted CHANGELOG-*.md files: "
logrun -s git commit -am \
"Delete extraneous CHANGELOG-*.md files on branch." \
|| return 1
fi

git_tag $label $branch
}

Expand Down

0 comments on commit 5a9c0cf

Please sign in to comment.