File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 66 version :
77 description : ' Version number (e.g., 1.0.1)'
88 required : true
9+ is_patch :
10+ description : ' Is this a patch? (true or false)'
11+ required : true
12+ default : ' false'
913
1014env :
1115 AWS_DEFAULT_REGION : us-east-1
@@ -100,8 +104,19 @@ jobs:
100104 sed -i 's/__version__ = ".*"/__version__ = "'$DEV_VERSION'"/' aws-opentelemetry-distro/src/amazon/opentelemetry/distro/version.py
101105 VERSION="${{ github.event.inputs.version }}"
102106 sed -i 's/python:v.*"/python:v'$VERSION'"/' .github/workflows/daily-scan.yml
107+
108+ # for patch releases, avoid merge conflict by manually resolving CHANGELOG with main
109+ if [[ "${{ github.event.inputs.is_patch }}" == "true" ]]; then
110+ git fetch origin main
111+ git show origin/main:CHANGELOG.md | sed -n '/## Unreleased/,/^## v[0-9]/p' | sed '$d' | tail -n +2 | sed '/^$/d' > /tmp/unreleased_content.txt
112+
113+ # Insert the content right after the existing "## Unreleased" header
114+ sed -i '/## Unreleased/r /tmp/unreleased_content.txt' CHANGELOG.md
115+ fi
116+
103117 git add aws-opentelemetry-distro/src/amazon/opentelemetry/distro/version.py
104118 git add .github/workflows/daily-scan.yml
119+ git add CHANGELOG.md
105120 git commit -m "Prepare main for next development cycle: Update version to $DEV_VERSION"
106121 git push --set-upstream origin "prepare-main-for-next-dev-cycle-${VERSION}"
107122
You can’t perform that action at this time.
0 commit comments