clone

an offline map explorer where each world, from a game map to a city's open data, ships as one .atlas file

feat/atlas-next-horizon
atlas / scripts / release / package-smoke.sh
package-smoke.sh 1.5K executable
1#!/usr/bin/env bash2set -euo pipefail34if [[ $# -ne 3 ]]; then5 echo "usage: package-smoke.sh <dist> <version> <repo-root>" >&26 exit 27fi89dist=$110version=$211root=$312smoke=$(mktemp -d)13trap 'rm -rf "$smoke"' EXIT1415unzip -Z1 "$dist/Atlas-$version-darwin-arm64.zip" | grep -Fx 'Atlas.app/Contents/Info.plist'16unzip -Z1 "$dist/Atlas-$version-darwin-arm64.zip" | grep -Fx 'Atlas.app/Contents/MacOS/Atlas'17dpkg-deb --info "$dist/Atlas-$version-linux-amd64.deb" >/dev/null18dpkg-deb --contents "$dist/Atlas-$version-linux-amd64.deb" | grep -F 'usr/share/applications/dev.felinestatemachine.Atlas.desktop'19dpkg-deb --contents "$dist/Atlas-$version-linux-amd64.deb" | grep -F 'usr/share/mime/packages/dev.felinestatemachine.atlas.xml'2021tar -xzf "$dist/atlas-cli-$version-linux-amd64.tar.gz" -C "$smoke"22cli=$(find "$smoke" -type f -name atlas -perm -u+x -print -quit)23[[ -n "$cli" ]]24"$cli" --help >/dev/null25"$cli" --version | grep -F "$version"2627cache="$smoke/cache"28online="$smoke/online"29offline="$smoke/offline"30mkdir -p "$cache" "$online" "$offline"31"$cli" build -cache "$cache" -bundles "$online" "$root/examples/sample-region.atlas-project"32"$cli" build -offline -cache "$cache" -bundles "$offline" "$root/examples/sample-region.atlas-project"33online_atlas=$(find "$online" -maxdepth 1 -type f -name '*.atlas' -print -quit)34offline_atlas=$(find "$offline" -maxdepth 1 -type f -name '*.atlas' -print -quit)35[[ -n "$online_atlas" && -n "$offline_atlas" ]]36cmp "$online_atlas" "$offline_atlas"37"$cli" measure -bundles "$online" -json sample-region | grep -F 'sample-region'