@@ -10,12 +10,17 @@ TEST_RES_DIR='tools/src/test/resources'
1010
1111REMOTE=" https://github.com/${GITHUB_REPOSITORY:- CycloneDX/ specification} .git"
1212
13- BUF_IMAGE_VERSION=' 1.46 .0'
14-
13+ BUF_IMAGE_VERSION=' 1.50 .0'
14+ BUF_IMAGE= " bufbuild/buf: $BUF_IMAGE_VERSION "
1515
1616# # ----
1717
1818
19+ function prepare () {
20+ docker pull " $BUF_IMAGE "
21+ }
22+
23+
1924function schema-lint () {
2025 echo ' > lint schema files' >&2
2126
@@ -30,7 +35,7 @@ function schema-lint () {
3035 --volume " ${ROOT_PATH} /${SCHEMA_DIR} :/workspace/${SCHEMA_DIR} :ro" \
3136 --volume " ${THIS_PATH} /buf_lint.yaml:/workspace/buf.yaml:ro" \
3237 --workdir ' /workspace' \
33- bufbuild/buf: " $BUF_IMAGE_VERSION " \
38+ " $BUF_IMAGE " \
3439 lint --path " $SCHEMA_DIR " \
3540 --error-format " $LOG_FORMAT "
3641
@@ -66,7 +71,7 @@ function schema-breaking-version () {
6671 --volume " ${NEW_NP} :/workspaces/new/${SCHEMA_DIR} /${NEW} :ro" \
6772 --volume " ${THIS_PATH} /buf_breaking-version.yaml:/workspaces/new/buf.yaml:ro" \
6873 --workdir ' /workspaces/new' \
69- bufbuild/buf: " $BUF_IMAGE_VERSION " \
74+ " $BUF_IMAGE " \
7075 breaking \
7176 --against ../old \
7277 --error-format " $LOG_FORMAT "
@@ -93,7 +98,7 @@ function schema-breaking-remote () {
9398 --volume " ${ROOT_PATH} /${SCHEMA_DIR} :/workspace/${SCHEMA_DIR} :ro" \
9499 --volume " ${THIS_PATH} /buf_breaking-remote.yaml:/workspace/buf.yaml:ro" \
95100 --workdir ' /workspace' \
96- bufbuild/buf: " $BUF_IMAGE_VERSION " \
101+ " $BUF_IMAGE " \
97102 breaking --path " $SCHEMA_DIR " \
98103 --against " ${REMOTE} " \
99104 --error-format " $LOG_FORMAT "
@@ -118,7 +123,7 @@ function schema-functional () {
118123 --volume " ${ROOT_PATH} /${SCHEMA_DIR} :/workspace/${SCHEMA_DIR} :ro" \
119124 --volume " ${FILE} :/workspace/test_res:ro" \
120125 --workdir ' /workspace' \
121- bufbuild/buf: " $BUF_IMAGE_VERSION " \
126+ " $BUF_IMAGE " \
122127 convert " ${SCHEMA_DIR} /${SCHEMA_FILE} " \
123128 --type " $MESSAGE " \
124129 --from ' test_res#format=txtpb' \
@@ -141,23 +146,29 @@ function schema-functional () {
141146
142147case " ${1:- all} " in
143148 ' schema-lint' )
149+ prepare
144150 schema-lint
145151 ;;
146152 ' schema-breaking-version' )
153+ prepare
147154 schema-breaking-version
148155 ;;
149156 ' schema-breaking-remote' )
157+ prepare
150158 schema-breaking-remote
151159 ;;
152160 ' schema-breaking' )
161+ prepare
153162 schema-breaking-version
154163 schema-breaking-remote
155164 ;;
156165 ' schema-functional' )
166+ prepare
157167 schema-functional
158168 ;;
159169 ' all' )
160170 # all the above
171+ prepare
161172 schema-lint
162173 schema-breaking-version
163174 schema-breaking-remote
0 commit comments