-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·32 lines (26 loc) · 910 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e
rm -rf .release
mkdir -p .release
make clean
arch=`uname -m`
version=`git tag --sort=-version:refname | head -n 1`
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
echo "Buidling for host ${arch}..."
make build
cp .build/raccoon-pirate .release/raccoon-pirate-linux-${arch}
if [ "${arch}" = "x86_64" ]; then
cp .build/raccoon-pirate .release/raccoon-pirate-linux-amd64
fi
make clean
arch="arm64"
echo "Building for ${arch}..."
TARGET_TRIPLET=aarch64-rpi3-linux-gnu make rpi
cp .build/rpi/build/raccoon-pirate .release/raccoon-pirate-linux-${arch}
make clean
arch="aarch64"
echo "Building package for Batocera..."
TARGET_TRIPLET=aarch64-rpi3-linux-gnu make batocera
short_version="${version:1}"
cp .build/batocera/raccoon-pirate-${short_version}-1-${arch}.pkg.tar.zst .release/raccoon-pirate-batocera-${short_version}-1-${arch}.pkg.tar.zst
make clean