Skip to content

Commit 1c21715

Browse files
authored
Fix various release scripts aspects (#2267)
1 parent adfb1c7 commit 1c21715

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.github/workflows/release.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ jobs:
4545
4646
echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV
4747
48-
# check out main branch to verify there won't be problems with merging the change log
49-
# at the end of this workflow
50-
- uses: actions/checkout@v3
51-
with:
52-
ref: main
53-
5448
- run: |
5549
if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then
5650
# not making a patch release
@@ -60,6 +54,12 @@ jobs:
6054
fi
6155
fi
6256
57+
# check out main branch to verify there won't be problems with merging the change log
58+
# at the end of this workflow
59+
- uses: actions/checkout@v3
60+
with:
61+
ref: main
62+
6363
# back to the release branch
6464
- uses: actions/checkout@v3
6565

RELEASING.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
* If making a pre-release of stable components (e.g. release candidate),
88
enter the pre-release version number, e.g. `1.9.0rc2`.
99
(otherwise the workflow will pick up the version from `main` and just remove the `.dev` suffix).
10-
* Review and merge the two pull requests that it creates
10+
* Review the two pull requests that it creates.
1111
(one is targeted to the release branch and one is targeted to `main`).
12+
* Merge the one targeted towards the release branch.
13+
* 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.
1214

1315
## Preparing a new patch release
1416

scripts/build.sh

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

0 commit comments

Comments
 (0)