2020-01-12 01:07:19 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# Called by Github Actions workflow
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
output=$1;
|
|
|
|
runner=$2;
|
2020-05-17 19:25:44 +03:00
|
|
|
game_binary=$3;
|
|
|
|
importer_binary=$4;
|
2020-11-12 21:01:45 +03:00
|
|
|
headless_binary=$5;
|
2020-01-12 01:07:19 +03:00
|
|
|
|
2020-05-02 23:19:24 +03:00
|
|
|
cargo run --bin updater
|
2020-02-09 00:25:48 +03:00
|
|
|
|
2020-01-12 01:07:19 +03:00
|
|
|
mkdir $output
|
|
|
|
|
2020-08-11 00:56:39 +03:00
|
|
|
cp book/src/howto/README.md $output/INSTRUCTIONS.txt
|
2020-01-12 01:07:19 +03:00
|
|
|
cp release/$runner $output
|
2020-11-12 21:01:45 +03:00
|
|
|
# Put the importer and headless 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-05-17 19:25:44 +03:00
|
|
|
cp $game_binary $output/game
|
2020-07-12 21:46:52 +03:00
|
|
|
cp $importer_binary $output
|
2020-11-12 21:01:45 +03:00
|
|
|
cp $headless_binary $output
|
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
|