2020-01-12 01:07:19 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# Called by Github Actions workflow
|
|
|
|
|
2020-11-30 03:01:18 +03:00
|
|
|
set -e;
|
2020-01-12 01:07:19 +03:00
|
|
|
|
2020-11-30 03:01:18 +03:00
|
|
|
os=$1;
|
|
|
|
case $os in
|
|
|
|
ubuntu-latest)
|
|
|
|
output="abst_linux";
|
|
|
|
suffix="";
|
|
|
|
runner="play_abstreet.sh";
|
|
|
|
;;
|
2020-01-12 01:07:19 +03:00
|
|
|
|
2020-11-30 03:01:18 +03:00
|
|
|
macos-latest)
|
|
|
|
output="abst_mac";
|
|
|
|
suffix="";
|
|
|
|
runner="play_abstreet.sh";
|
|
|
|
;;
|
|
|
|
|
|
|
|
windows-latest)
|
|
|
|
output="abst_windows";
|
|
|
|
suffix=".exe";
|
|
|
|
runner="play_abstreet.bat";
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "Wat? os = $os";
|
|
|
|
exit 1;
|
|
|
|
esac
|
2020-02-09 00:25:48 +03:00
|
|
|
|
2020-01-12 01:07:19 +03:00
|
|
|
mkdir $output
|
|
|
|
|
2021-02-01 21:35:52 +03:00
|
|
|
cp release/$runner release/INSTRUCTIONS.txt $output
|
2020-11-30 03:01:18 +03:00
|
|
|
|
|
|
|
# Put most binaries in the root directory, but hide game to encourage people to
|
|
|
|
# use the runner script. It will capture output logs. But if somebody runs the
|
|
|
|
# game binary directly, it'll still work.
|
2020-01-12 01:07:19 +03:00
|
|
|
mkdir $output/game
|
2020-11-30 03:01:18 +03:00
|
|
|
cp target/release/game${suffix} $output/game
|
|
|
|
|
2021-01-13 21:52:07 +03:00
|
|
|
for name in fifteen_min osm_viewer parking_mapper santa importer; do
|
2020-11-30 03:01:18 +03:00
|
|
|
cp target/release/${name}${suffix} $output;
|
|
|
|
done
|
|
|
|
|
2020-05-09 07:36:39 +03:00
|
|
|
mkdir $output/data
|
2020-05-04 21:43:19 +03:00
|
|
|
cp -Rv data/system $output/data/system
|
2020-10-09 00:26:35 +03:00
|
|
|
cp data/MANIFEST.json $output/data
|
2020-01-12 01:07:19 +03:00
|
|
|
|
2020-06-11 02:20:16 +03:00
|
|
|
# Windows doesn't have zip?!
|
|
|
|
if [[ "$output" != "abst_windows" ]]; then
|
|
|
|
# TODO Github will double-zip this, but if we just pass the directory, then the
|
|
|
|
# chmod +x bits get lost
|
|
|
|
zip -r $output $output
|
|
|
|
rm -rf release_data.zip $output
|
|
|
|
fi
|