Skip to content

Commit

Permalink
simplify for maintenance
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck committed Apr 10, 2024
1 parent 882f04f commit 3543488
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docgen/json/gen.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -eu

THIS_DIR="$(dirname "$0")"
THIS_PATH="$(realpath "$(dirname "$0")")"
SCHEMA_DIR="$(realpath "$THIS_DIR/../../schema")"
DOCS_DIR="$THIS_DIR/docs"
TEMPLATES_DIR="$THIS_DIR/templates"
Expand Down
2 changes: 1 addition & 1 deletion docgen/xml/gen.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -eu

THIS_DIR="$(dirname "$0")"
THIS_PATH="$(realpath "$(dirname "$0")")"
SCHEMA_DIR="$(realpath "$THIS_DIR/../../schema")"
DOCS_DIR="$THIS_DIR/docs"

Expand Down
10 changes: 6 additions & 4 deletions tools/src/test/proto/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ TEST_RES_DIR='tools/src/test/resources'

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

BUF_IMAGE_VERSION='1.30.0'


## ----

Expand All @@ -28,7 +30,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:1.30.0 \
bufbuild/buf:"$BUF_IMAGE_VERSION" \
lint --path "$SCHEMA_DIR" \
--config 'buf.yaml' \
--error-format "$LOG_FORMAT"
Expand Down Expand Up @@ -59,7 +61,7 @@ function schema-breaking-version () {
--volume "${ROOT_PATH}/${SCHEMA_DIR}/${OLD}:/workspace/${SCHEMA_DIR_OLD}/${NEW}:ro" \
--volume "${THIS_PATH}/buf_breaking-version.yaml:/workspace/buf.yaml:ro" \
--workdir '/workspace' \
bufbuild/buf:1.30.0 \
bufbuild/buf:"$BUF_IMAGE_VERSION" \
breaking "$SCHEMA_DIR" \
--against "$SCHEMA_DIR_OLD" \
--config 'buf.yaml' \
Expand Down Expand Up @@ -87,7 +89,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:1.30.0 \
bufbuild/buf:"$BUF_IMAGE_VERSION" \
breaking "$SCHEMA_DIR" \
--against "${REMOTE}#subdir=${SCHEMA_DIR}" \
--config 'buf.yaml' \
Expand All @@ -113,7 +115,7 @@ function schema-functional () {
--volume "${ROOT_PATH}/${SCHEMA_DIR}:/workspace/${SCHEMA_DIR}:ro" \
--volume "${FILE}:/workspace/test_res:ro" \
--workdir '/workspace' \
bufbuild/buf:1.30.0 \
bufbuild/buf:"$BUF_IMAGE_VERSION" \
convert "${SCHEMA_DIR}/${SCHEMA_FILE}" \
--type "$MESSAGE" \
--from 'test_res#format=txtpb' \
Expand Down

0 comments on commit 3543488

Please sign in to comment.