summaryrefslogtreecommitdiffstats
path: root/common/bin/build_release.sh
blob: 2f09661532b1054f1654c01b7180c5a5b1b87ec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

set -eu

tmp=$(mktemp -d -t moonmmon)

echo "[*] Building into $tmp..."

cd "$tmp"
git clone https://github.com/moonmoon/moonmoon.git --depth=1 --recursive -j8
cd moonmoon
composer install --no-suggest --prefer-dist --no-dev
git describe --abbrev=0 --tags > VERSION
find . -name .DS_Store -exec rm {} \;
rm -rf .git .github .travis.yml .gitignore .gitmodules docs/.git/
mkdir cache
cd ..
zip -r "moonmoon-$(cat moonmoon/VERSION).zip" .

echo "[*] Grab the archive: ${tmp}/moonmoon-$(cat moonmoon/VERSION).zip"