Fix various release scripts aspects (#2267)

This commit is contained in:
Leighton Chen 2024-02-23 10:50:39 -08:00 committed by GitHub
parent adfb1c763d
commit 1c2171528e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 10 deletions

View File

@ -45,12 +45,6 @@ jobs:
echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV
# check out main branch to verify there won't be problems with merging the change log
# at the end of this workflow
- uses: actions/checkout@v3
with:
ref: main
- run: | - run: |
if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then
# not making a patch release # not making a patch release
@ -60,6 +54,12 @@ jobs:
fi fi
fi fi
# check out main branch to verify there won't be problems with merging the change log
# at the end of this workflow
- uses: actions/checkout@v3
with:
ref: main
# back to the release branch # back to the release branch
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -7,8 +7,10 @@
* If making a pre-release of stable components (e.g. release candidate), * If making a pre-release of stable components (e.g. release candidate),
enter the pre-release version number, e.g. `1.9.0rc2`. enter the pre-release version number, e.g. `1.9.0rc2`.
(otherwise the workflow will pick up the version from `main` and just remove the `.dev` suffix). (otherwise the workflow will pick up the version from `main` and just remove the `.dev` suffix).
* Review and merge the two pull requests that it creates * Review the two pull requests that it creates.
(one is targeted to the release branch and one is targeted to `main`). (one is targeted to the release branch and one is targeted to `main`).
* Merge the one targeted towards the release branch.
* The builds will fail for the `main` pr because of validation rules. Follow the [release workflow](https://github.com/open-telemetry/opentelemetry-python/blob/main/RELEASING.md) for the core repo up until this same point. Change the SHAs of each PR to point at each other to get the `main` builds to pass.
## Preparing a new patch release ## Preparing a new patch release

View File

@ -32,16 +32,16 @@ DISTDIR=dist
cd $DISTDIR cd $DISTDIR
for x in * ; do for x in * ; do
# FIXME: Remove this logic once these packages are available in Pypi # FIXME: Remove this logic once these packages are available in Pypi
if (echo "$x" | grep -Eq ^opentelemetry_(instrumentation_aiohttp_server|resource_detector_container).*(\.tar\.gz|\.whl)$); then if echo "$x" | grep -Eq "^opentelemetry_(instrumentation_aiohttp_server|resource_detector_container).*(\.tar\.gz|\.whl)$"; then
echo "Skipping $x because of erroneous uploads. See: https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2053" echo "Skipping $x because of erroneous uploads. See: https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2053"
rm $x rm $x
# FIXME: Remove this once opentelemetry-resource-detector-azure package goes 1.X # FIXME: Remove this once opentelemetry-resource-detector-azure package goes 1.X
elif (echo "$x" | grep -Eq ^opentelemetry_resource_detector_azure.*(\.tar\.gz|\.whl)$); then elif echo "$x" | grep -Eq "^opentelemetry_resource_detector_azure.*(\.tar\.gz|\.whl)$"; then
echo "Skipping $x because of manual upload by Azure maintainers." echo "Skipping $x because of manual upload by Azure maintainers."
rm $x rm $x
# NOTE: We filter beta vs 1.0 package at this point because we can read the # NOTE: We filter beta vs 1.0 package at this point because we can read the
# version directly from the .tar.gz/whl file # version directly from the .tar.gz/whl file
elif (echo "$x" | grep -Eq ^opentelemetry_.*-0\..*(\.tar\.gz|\.whl)$); then elif echo "$x" | grep -Eq "^opentelemetry_.*-0\..*(\.tar\.gz|\.whl)$"; then
: :
else else
echo "Skipping $x because it is not in pre-1.0 state and should be released using a tag." echo "Skipping $x because it is not in pre-1.0 state and should be released using a tag."