34 lines
1.0 KiB
Bash
34 lines
1.0 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
VERSION="$(git describe --tags)"
|
||
|
PATH="$PWD/tools:$PATH"
|
||
|
|
||
|
if [ -z "$VERSION" ]; then
|
||
|
echo "Could not parse version from git"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
mkdir -p release/$VERSION
|
||
|
|
||
|
pharlite
|
||
|
|
||
|
cp spark.phar release/$VERSION/spark.phar
|
||
|
cp README.md release/$VERSION/README.md
|
||
|
cp CHANGELOG.md release/$VERSION/CHANGELOG.md
|
||
|
7z a -tzip "release/$VERSION/spark-$VERSION-dist.zip" spark.phar plugins README.md CHANGELOG.md
|
||
|
tar cvfz "release/$VERSION/spark-$VERSION-dist.tgz" spark.phar plugins README.md CHANGELOG.md
|
||
|
7z a -tzip "release/$VERSION/spark-$VERSION-src.zip" bin src runtime plugins composer.json README.md CHANGELOG.md
|
||
|
tar cvfz "release/$VERSION/spark-$VERSION-src.tgz" bin src runtime plugins composer.json README.md CHANGELOG.md
|
||
|
|
||
|
test -d release/tmp && rm -rf release/tmp
|
||
|
mkdir release/tmp
|
||
|
cp -R spark.phar plugins README.md CHANGELOG.md release/tmp/
|
||
|
pushd release/tmp
|
||
|
makeself . ../$VERSION/spark-$VERSION-dist.run "Spark $VERSION" ./spark.phar install
|
||
|
popd
|
||
|
rm -rf release/tmp
|
||
|
|
||
|
echo -e "\e[1m[release/$VERSION]\e[0m"
|
||
|
ls -hl release/$VERSION
|
||
|
|