Skip to content

Commit

Permalink
fix: stop running in template project
Browse files Browse the repository at this point in the history
We don't want to generate the schema.avsc in template project
as it causes a breaking change detection at the first commit
in the project created from templates.
  • Loading branch information
yannrouillard committed Feb 23, 2024
1 parent 5bdeea0 commit c646b44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kafka/check-local-schemas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ is_git_tracked() {
git ls-files --error-unmatch "$1" &> /dev/null || return 1
}

get_repository_url() {
git remote get-url origin
}

get_md5sum() {
local file="$1"
md5sum "${file}" | awk '{ print $1}'
Expand Down Expand Up @@ -133,6 +137,9 @@ run_schema_generator_code() {

trap clean_temporary_folder EXIT

# We don't want to run on template repositories
[[ "$(get_repository_url)" != "[email protected]:Kpler/template-"* ]] || exit 0

check_binary_exists "sbt"

target_schema_file="schemas/schema.avsc"
Expand Down

0 comments on commit c646b44

Please sign in to comment.