Skip to content

Commit

Permalink
Fix and print version
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Jan 26, 2024
1 parent c039b69 commit 0e3046d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,17 @@ function map_themes_post() {
then
if [ "${OldMapHashes["$map_name"]}" != "$(sha1sum ./maps/"$map_name".map | cut -d' ' -f1)" ]
then
local version_script
map_version=null
version_script="$CFG_GIT_ROOT"/maps-scripts/"$map_name"/print_version.py
log "map '$map_name' updated generating new themes ..."
log " old: ${OldMapHashes["$map_name"]}"
log " new: $(sha1sum ./maps/"$map_name".map | cut -d' ' -f1)"
if [[ -f "$version_script" ]]
then
map_version="$($version_script ./maps/"$map_name".map)"
log " version: $map_version"
fi
for t in "$CFG_GIT_ROOT"/maps-scripts/"$map_name"/themes/*.py
do
local theme_name
Expand All @@ -132,13 +140,6 @@ function map_themes_post() {
then
pushd ./designs/ > /dev/null || exit 1
local map_version
local version_script
map_version=null
version_script="$CFG_GIT_ROOT"/maps-scripts/"$map_name"/print_version.py
if [ -f "$version_script" ]
then
map_version="$($version_script)"
fi
git commit -m "Updated map $map_name theme $theme_name to version $map_version"
popd > /dev/null || exit 1
fi
Expand Down

0 comments on commit 0e3046d

Please sign in to comment.