-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing patch dependencies scope restriction to release branch only (#…
…670) Removing patches scope restriction to release branch
- Loading branch information
1 parent
e48f3cf
commit 6c223a3
Showing
4 changed files
with
20 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,29 +2,26 @@ | |
# Enable debug mode, fail on any command that fail in this script and fail on unset variables | ||
set -x -e -u | ||
|
||
# This parameter will help find the patches to be applied | ||
BRANCH=$1 | ||
|
||
# .github/patches/$BRANCH/versions.sh should define all the versions of the dependencies that we are going to patch | ||
# .github/patches/versions.sh should define all the versions of the dependencies that we are going to patch | ||
# This is used so that we can properly clone the upstream repositories. | ||
# This file should define the following variables: | ||
# OTEL_JAVA_VERSION. Tag of the opentelemetry-java repository to use. E.g.: JAVA_OTEL_JAVA_VERSION=v1.21.0 | ||
# OTEL_JAVA_INSTRUMENTATION_VERSION. Tag of the opentelemetry-java-instrumentation repository to use, e.g.: OTEL_JAVA_INSTRUMENTATION_VERSION=v1.21.0 | ||
# OTEL_JAVA_CONTRIB_VERSION. Tag of the opentelemetry-java-contrib repository. E.g.: OTEL_JAVA_CONTRIB_VERSION=v1.21.0 | ||
# This script will fail if a variable that is supposed to exist is referenced. | ||
|
||
if [[ ! -f .github/patches/${BRANCH}/versions ]]; then | ||
if [[ ! -f .github/patches/versions ]]; then | ||
echo "No versions file found. Skipping patching" | ||
exit 0 | ||
fi | ||
|
||
source .github/patches/${BRANCH}/versions | ||
source .github/patches/versions | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "ADOT Patch workflow" | ||
|
||
|
||
OTEL_JAVA_PATCH=".github/patches/${BRANCH}/opentelemetry-java.patch" | ||
OTEL_JAVA_PATCH=".github/patches/opentelemetry-java.patch" | ||
if [[ -f "$OTEL_JAVA_PATCH" ]]; then | ||
git clone https://github.com/open-telemetry/opentelemetry-java.git | ||
cd opentelemetry-java | ||
|
@@ -37,7 +34,7 @@ else | |
fi | ||
|
||
|
||
OTEL_JAVA_CONTRIB_PATCH=".github/patches/${BRANCH}/opentelemetry-java-contrib.patch" | ||
OTEL_JAVA_CONTRIB_PATCH=".github/patches/opentelemetry-java-contrib.patch" | ||
if [[ -f "$OTEL_JAVA_CONTRIB_PATCH" ]]; then | ||
git clone https://github.com/open-telemetry/opentelemetry-java-contrib.git | ||
cd opentelemetry-java-contrib | ||
|
@@ -50,7 +47,7 @@ else | |
fi | ||
|
||
|
||
OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/${BRANCH}/opentelemetry-java-instrumentation.patch" | ||
OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/opentelemetry-java-instrumentation.patch" | ||
if [[ -f "$OTEL_JAVA_INSTRUMENTATION_PATCH" ]]; then | ||
git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.git | ||
cd opentelemetry-java-instrumentation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters