Skip to content

Commit

Permalink
chore: bump tools buf 1.50.0 (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkowalleck authored Feb 6, 2025
2 parents 6374e6f + 5ebc67d commit 5006037
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions tools/src/test/proto/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ TEST_RES_DIR='tools/src/test/resources'

REMOTE="https://github.com/${GITHUB_REPOSITORY:-CycloneDX/specification}.git"

BUF_IMAGE_VERSION='1.46.0'

BUF_IMAGE_VERSION='1.50.0'
BUF_IMAGE="bufbuild/buf:$BUF_IMAGE_VERSION"

## ----


function prepare () {
docker pull "$BUF_IMAGE"
}


function schema-lint () {
echo '> lint schema files' >&2

Expand All @@ -30,7 +35,7 @@ function schema-lint () {
--volume "${ROOT_PATH}/${SCHEMA_DIR}:/workspace/${SCHEMA_DIR}:ro" \
--volume "${THIS_PATH}/buf_lint.yaml:/workspace/buf.yaml:ro" \
--workdir '/workspace' \
bufbuild/buf:"$BUF_IMAGE_VERSION" \
"$BUF_IMAGE" \
lint --path "$SCHEMA_DIR" \
--error-format "$LOG_FORMAT"

Expand Down Expand Up @@ -66,7 +71,7 @@ function schema-breaking-version () {
--volume "${NEW_NP}:/workspaces/new/${SCHEMA_DIR}/${NEW}:ro" \
--volume "${THIS_PATH}/buf_breaking-version.yaml:/workspaces/new/buf.yaml:ro" \
--workdir '/workspaces/new' \
bufbuild/buf:"$BUF_IMAGE_VERSION" \
"$BUF_IMAGE" \
breaking \
--against ../old \
--error-format "$LOG_FORMAT"
Expand All @@ -93,7 +98,7 @@ function schema-breaking-remote () {
--volume "${ROOT_PATH}/${SCHEMA_DIR}:/workspace/${SCHEMA_DIR}:ro" \
--volume "${THIS_PATH}/buf_breaking-remote.yaml:/workspace/buf.yaml:ro" \
--workdir '/workspace' \
bufbuild/buf:"$BUF_IMAGE_VERSION" \
"$BUF_IMAGE" \
breaking --path "$SCHEMA_DIR" \
--against "${REMOTE}" \
--error-format "$LOG_FORMAT"
Expand All @@ -118,7 +123,7 @@ function schema-functional () {
--volume "${ROOT_PATH}/${SCHEMA_DIR}:/workspace/${SCHEMA_DIR}:ro" \
--volume "${FILE}:/workspace/test_res:ro" \
--workdir '/workspace' \
bufbuild/buf:"$BUF_IMAGE_VERSION" \
"$BUF_IMAGE" \
convert "${SCHEMA_DIR}/${SCHEMA_FILE}" \
--type "$MESSAGE" \
--from 'test_res#format=txtpb' \
Expand All @@ -141,23 +146,29 @@ function schema-functional () {

case "${1:-all}" in
'schema-lint')
prepare
schema-lint
;;
'schema-breaking-version')
prepare
schema-breaking-version
;;
'schema-breaking-remote')
prepare
schema-breaking-remote
;;
'schema-breaking')
prepare
schema-breaking-version
schema-breaking-remote
;;
'schema-functional')
prepare
schema-functional
;;
'all')
# all the above
prepare
schema-lint
schema-breaking-version
schema-breaking-remote
Expand Down

0 comments on commit 5006037

Please sign in to comment.