File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
core/spt-base/src/main/resources/config Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 109109 node : false
110110 port : 9999
111111 scenario : null
112- version : 5.0.2
112+ version : 5.1.0
113113
114114log :
115115 level : info
Original file line number Diff line number Diff line change 115115 node : false
116116 port : 9999
117117 scenario : null
118- version : 5.0.2
118+ version : 5.1.0
119119
120120log :
121121 level : info
Original file line number Diff line number Diff line change @@ -78,6 +78,23 @@ check_contains "engine/bundle/build.gradle" "rootProject.ext.SPT_VERSION"
7878check_contains " engine/bundle/Dockerfile" " ARG SPT_VERSION="
7979check_contains " engine/bundle/Dockerfile" " LABEL version=\"\$ {SPT_VERSION}\" "
8080
81+ # Check that defaults.yaml contains the correct version
82+ # This is critical because spt-base/build.gradle reads version from defaults.yaml
83+ check_version_in_yaml () {
84+ local file=" $1 "
85+ if [[ ! -f " ${ROOT_DIR} /${file} " ]]; then
86+ errors+=(" Expected file ${file} not found" )
87+ return
88+ fi
89+ local yaml_version
90+ yaml_version=$( grep -E ' ^\s*version:\s*' " ${ROOT_DIR} /${file} " | tail -1 | sed ' s/.*version:\s*//' | tr -d ' [:space:]' )
91+ if [[ -n " ${REPO_VERSION} " && " ${yaml_version} " != " ${REPO_VERSION} " ]]; then
92+ errors+=(" Version in ${file} is '${yaml_version} ' but VERSION file has '${REPO_VERSION} '" )
93+ fi
94+ }
95+
96+ check_version_in_yaml " engine/core/spt-base/src/main/resources/config/defaults.yaml"
97+
8198if [[ " ${# errors[@]} " -gt 0 ]]; then
8299 printf ' Version sync check failed:\n' >&2
83100 for err in " ${errors[@]} " ; do
You can’t perform that action at this time.
0 commit comments