osm-garmin: improve map versioning
parent
534fc63d32
commit
47696a43af
|
@ -19,13 +19,21 @@ function build_gmap() {
|
|||
|
||||
region_shortname="$(get_region_shortname "$region")"
|
||||
generated_map_dir="$out_dir/$region_shortname/"
|
||||
version_path="$generated_map_dir/version.txt"
|
||||
|
||||
bounds_dir_md5="$(get_md5_dir "$bounds_dir")"
|
||||
map_md5="$(get_md5 "$maps_dir/$region_shortname.osm.pbf")"
|
||||
style_md5="$(get_md5 "$styles_dir/$style.TYP")"
|
||||
|
||||
version="$(echo "$bounds_dir_md5|$map_md5|$style_md5" | md5sum | cut -d' ' -f1)"
|
||||
version_path="$generated_map_dir/version.txt"
|
||||
version_id=""
|
||||
version_md5="$(echo "$bounds_dir_md5|$map_md5|$style_md5" | md5sum | cut -d' ' -f1)"
|
||||
|
||||
if [[ -f "$version_path" ]]; then
|
||||
version_id="$(cat "$version_path" | cut -d'|' -f1)"
|
||||
version_id="$((version_id+1))"
|
||||
fi
|
||||
|
||||
version="$version_id|$version_md5"
|
||||
|
||||
build="true"
|
||||
build_failed="false"
|
||||
|
@ -43,7 +51,7 @@ function build_gmap() {
|
|||
|
||||
family_name=""
|
||||
product_id="$region_id"
|
||||
product_version="$(date --utc +%y%j%H%M)"
|
||||
product_version="$version_id"
|
||||
|
||||
[[ -n $OSMGARMIN_MAP_FAMILY_NAME ]] && family_name="$OSMGARMIN_MAP_FAMILY_NAME"
|
||||
|
||||
|
|
Loading…
Reference in New Issue