Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/update-protobuf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run scripts
shell: bash
working-directory: ./tools/
run: |
./update-sha.sh ${{ inputs.envoy_version }} | tee API_SHAS
Expand Down
14 changes: 7 additions & 7 deletions tools/update-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ pushd "${tmpdir}" >/dev/null

rm -rf "${protodir}"

curl -sL https://github.com/envoyproxy/envoy/archive/${ENVOY_SHA}.tar.gz | tar xz --wildcards '*.proto'
curl -fsSL https://github.com/envoyproxy/envoy/archive/${ENVOY_SHA}.tar.gz | tar xz --wildcards '*.proto'
mkdir -p "${protodir}/envoy"
cp -r envoy-*/api/envoy/* "${protodir}/envoy"

curl -sL https://github.com/googleapis/googleapis/archive/${GOOGLEAPIS_SHA}.tar.gz | tar xz --wildcards '*.proto'
curl -fsSL https://github.com/googleapis/googleapis/archive/${GOOGLEAPIS_SHA}.tar.gz | tar xz --wildcards '*.proto'
mkdir -p "${protodir}/google/api"
mkdir -p "${protodir}/google/api/expr/v1alpha1"
mkdir -p "${protodir}/google/rpc"
Expand All @@ -42,25 +42,25 @@ cp googleapis-*/google/api/expr/v1alpha1/syntax.proto "${protodir}/google/api/ex
cp googleapis-*/google/api/expr/v1alpha1/checked.proto "${protodir}/google/api/expr/v1alpha1"
cp googleapis-*/google/rpc/status.proto "${protodir}/google/rpc"

curl -sL https://github.com/envoyproxy/protoc-gen-validate/archive/v${PGV_VERSION}.tar.gz | tar xz --wildcards '*.proto'
curl -fsSL https://github.com/envoyproxy/protoc-gen-validate/archive/v${PGV_VERSION}.tar.gz | tar xz --wildcards '*.proto'
mkdir -p "${protodir}/validate"
cp -r protoc-gen-validate-*/validate/* "${protodir}/validate"

curl -sL https://github.com/prometheus/client_model/archive/v${PROMETHEUS_SHA}.tar.gz | tar xz --wildcards '*.proto'
curl -fsSL https://github.com/prometheus/client_model/archive/v${PROMETHEUS_SHA}.tar.gz | tar xz --wildcards '*.proto'
mkdir -p "${protodir}/io/prometheus/client/"
cp client_model-*/io/prometheus/client/metrics.proto "${protodir}/io/prometheus/client/"

curl -sL https://github.com/cncf/xds/archive/${XDS_SHA}.tar.gz | tar xz --wildcards '*.proto'
curl -fsSL https://github.com/cncf/xds/archive/${XDS_SHA}.tar.gz | tar xz --wildcards '*.proto'
mkdir -p "${protodir}/udpa"
mkdir -p "${protodir}/xds"
cp -r xds-*/udpa/* "${protodir}/udpa"
cp -r xds-*/xds/* "${protodir}/xds"

curl -sL https://github.com/open-telemetry/opentelemetry-proto/archive/v${OPENTELEMETRY_VERSION}.tar.gz | tar xz --wildcards '*.proto'
curl -fsSL https://github.com/open-telemetry/opentelemetry-proto/archive/v${OPENTELEMETRY_VERSION}.tar.gz | tar xz --wildcards '*.proto'
mkdir -p "${protodir}/opentelemetry/proto"
cp -r opentelemetry-proto-*/opentelemetry/proto/* "${protodir}/opentelemetry/proto"

curl -sL https://github.com/google/cel-spec/archive/v${CEL_VERSION}.tar.gz | tar xz --wildcards '*.proto'
curl -fsSL https://github.com/google/cel-spec/archive/v${CEL_VERSION}.tar.gz | tar xz --wildcards '*.proto'
mkdir -p "${protodir}/cel/expr"
cp -r cel-spec-*/proto/cel/expr/* "${protodir}/cel/expr"

Expand Down
4 changes: 2 additions & 2 deletions tools/update-sha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ function find_date() {

function find_envoy_sha_from_tag() {
local TAG=$1
curl -s "https://api.github.com/repos/envoyproxy/envoy/commits/$TAG" | awk -F'"' '/"sha"/ && !found {print $4; found=1}'
curl -fsSL "https://api.github.com/repos/envoyproxy/envoy/commits/$TAG" | awk -F'"' '/"sha"/ && !found {print $4; found=1}'
}

CURRENT_ENVOY_RELEASE=$(cat envoy_release)
ENVOY_VERSION=$(find_envoy_sha_from_tag "$1")

CURL_OUTPUT=$(curl -s "https://raw.githubusercontent.com/envoyproxy/envoy/$ENVOY_VERSION/api/bazel/repository_locations.bzl")
CURL_OUTPUT=$(curl -fsSL "https://raw.githubusercontent.com/envoyproxy/envoy/$ENVOY_VERSION/api/bazel/repository_locations.bzl")

GOOGLEAPIS_SHA=$(find_sha "$CURL_OUTPUT" com_google_googleapis)
GOOGLEAPIS_DATE=$(find_date "$CURL_OUTPUT" com_google_googleapis)
Expand Down
Loading