mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 23:43:25 +03:00
refactoring the common parts of the release scripts
This commit is contained in:
parent
c82413fca5
commit
9b96ef69da
20
release/common.sh
Executable file
20
release/common.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
function common_release {
|
||||||
|
OUT=$1;
|
||||||
|
|
||||||
|
rm -rfv $OUT
|
||||||
|
mkdir $OUT
|
||||||
|
|
||||||
|
cp docs/INSTRUCTIONS.md $OUT
|
||||||
|
mkdir $OUT/data
|
||||||
|
cp data/color_scheme.json $OUT/data
|
||||||
|
|
||||||
|
mkdir $OUT/data/maps
|
||||||
|
for map in 23rd ballard caphill downtown montlake; do
|
||||||
|
cp -v data/maps/$map.bin $OUT/data/maps/
|
||||||
|
mkdir -p $OUT/data/scenarios/$map
|
||||||
|
cp -v data/scenarios/$map/psrc* $OUT/data/scenarios/$map/
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir $OUT/data/shapes
|
||||||
|
cp -v data/shapes/popdat.bin $OUT/data/shapes
|
||||||
|
}
|
@ -8,22 +8,10 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
|||||||
OUT=abstreet_mac
|
OUT=abstreet_mac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rfv $OUT
|
source release/common.sh
|
||||||
mkdir $OUT
|
common_release $OUT
|
||||||
|
|
||||||
cp docs/INSTRUCTIONS.md release/play_abstreet.sh $OUT
|
cp release/play_abstreet.sh $OUT
|
||||||
mkdir $OUT/data
|
|
||||||
cp data/color_scheme.json $OUT/data
|
|
||||||
|
|
||||||
mkdir $OUT/data/maps
|
|
||||||
for map in 23rd ballard caphill downtown montlake; do
|
|
||||||
cp -v data/maps/$map.bin $OUT/data/maps/
|
|
||||||
mkdir -p $OUT/data/scenarios/$map
|
|
||||||
cp -v data/scenarios/$map/psrc* $OUT/data/scenarios/$map/
|
|
||||||
done
|
|
||||||
|
|
||||||
mkdir $OUT/data/shapes
|
|
||||||
cp -v data/shapes/popdat.bin $OUT/data/shapes
|
|
||||||
|
|
||||||
mkdir $OUT/editor
|
mkdir $OUT/editor
|
||||||
cargo build --release --bin editor
|
cargo build --release --bin editor
|
||||||
|
@ -4,22 +4,11 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
OUT=abstreet_windows
|
OUT=abstreet_windows
|
||||||
rm -rfv $OUT
|
|
||||||
mkdir $OUT
|
|
||||||
|
|
||||||
cp docs/INSTRUCTIONS.md release/play_abstreet.bat $OUT
|
source release/common.sh
|
||||||
mkdir $OUT/data
|
common_release $OUT
|
||||||
cp data/color_scheme.json $OUT/data
|
|
||||||
|
|
||||||
mkdir $OUT/data/maps
|
cp release/play_abstreet.bat $OUT
|
||||||
for map in 23rd ballard caphill downtown montlake; do
|
|
||||||
cp -v data/maps/$map.bin $OUT/data/maps/
|
|
||||||
mkdir -p $OUT/data/scenarios/$map
|
|
||||||
cp -v data/scenarios/$map/psrc* $OUT/data/scenarios/$map/
|
|
||||||
done
|
|
||||||
|
|
||||||
mkdir $OUT/data/shapes
|
|
||||||
cp -v data/shapes/popdat.bin $OUT/data/shapes
|
|
||||||
|
|
||||||
mkdir $OUT/editor
|
mkdir $OUT/editor
|
||||||
cross build --release --target x86_64-pc-windows-gnu --bin editor
|
cross build --release --target x86_64-pc-windows-gnu --bin editor
|
||||||
|
Loading…
Reference in New Issue
Block a user